Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

For our WordPress development server, each developer has a subdomain to work on the site which point to the same server and database, but different folder locations. This allows us to see database changes immediately but we all code independently at the file level.

To do this, I have a separate apache site configuration for each subdomain. Example: Developer A: a.site.com Developer B: b.site.com

It works well, but I maintain two separate site configuration files (a and b) in /etc/apache2/sites-available that are 90% the same. Is there way to have the configuration files (a and b) "include" a common configuration file?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Including other files into Apache config is very simple:

# some comment here so you know what it does
Include "/path/to/your/config.file"
share|improve this answer
    
Thanks. After I set up the directory directive, I do an include of other server files. <Directory /_______> Include /etc/apache2/sites-available/rewrite-rules Include /etc/apache2/sites-available/html5-boilerplate </Directory> Now I can modify the rewrite rules for all the sites in one place. –  user1015373 Jun 28 '12 at 22:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.