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

I'm wondering if this is possible. We have different code bases - release, beta, test, etc. And we have a large number of client subdomains. Right now, when support needs to move a client from release to beta, for example, they need to edit the httpd.conf file and change the webroot for the client.

What I'm wondering is, could I create release, beta, test, etc. directories under our httpd/conf.d directory and then have separate virtual host files for each client under the appropriate directory and then support would just have to move the client file to the appropriate directory and the reload apache.

Is this possible? If so, how do I set it up?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Ubuntu comes with a2ensite and a2dissite. Which creates a softlink to the virtualhost conf files present in a folder called /etc/apache2/sites-enabled. Ofcourse, the original http.conf will use the Include directive. Include sites-enabled

I don't remember the default httpd folder layout on CentOS/RedHat but you can setup a similar configuration on your own. you'll need

1. A shell script to create a symlink in /etc/apache2/sites-enabled.
2. The Include sites-enabled directive in the default .conf file used
3. sites-enabled directory 
share|improve this answer
add comment

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.