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

greetings. i need to set up some ServerAlias records so multiple domains can be mapped to the same application folder however with this shared server i don't have access to the httpd-vhosts.conf file. Can this be done some other way, using .htaccess perhaps?

share|improve this question
sorry, i should add that my dev set up is xampp on windows (hence the vhosts file) whereas the production server will be apache. i don't know if there's a different file that can be edited for apache? – davidhyland Jun 8 '11 at 16:59
up vote 1 down vote accepted

ServerAlias directive can be defined in virtual host context but not in htaccess.

VirtualHost directive can only be defined in server config context. The httpd-vhosts.conf is linked/included into main config file and therefore part of the server config context.

P.S. xampp uses Apache as web server, so you will have Apache in both places anyway.

If you want to modify any parameters of <VirtualHost> you may write an email to the hosting company to see if they can do it for you. But I think that it most likely will be declined as virtually all operations on configuring <VirtualHost> are fully automated no manual editing is involved, and even if done the changes may get lost when you/they modify server config via control panel.

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.