0

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.

1 Answer 1

1

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.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .