Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have apache server installed on linux machine. As of now, i am using httpd-vhosts.conf file for the virtual hosting purpose. 4-5 domains(both IP and name based) are setup and all are working fine.

I have one requirement where I want to provide more control to client in terms of vhosts file. I can't provide access to httpd-vhosts.conf file to all users. I want to know is it possible to have local vhosts file inside site root, for all sites, with the same behavior as of httd-vhosts.conf file. I tried using .htaccess but failed to override or set some configurations inside httpd-vhsots.conf file.

Can anyone please let me know if this thing is possible - local vhosts file and that file can be referenced inside httpd-vhosts file of httpd file.

share|improve this question

Yes and no.

Yes because you can have conf file anywhere and include it with:

Include /home/user/httpd.include

maybe in <virtualhost></virtualhost> section.

No, because:

  • this way this special client can do anything with you config, i.e. make syntax error (no service for all after restart) or do something wrong to others.
  • server must be reloaded to apply changes done by this client, so you need a way to this client restart apache.

(It will help if you can explain what exactly can not be accomplished in .htaccess because .htaccess still looks like correct solution for you needs.)

share|improve this answer

Your Answer


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.