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 recently setup a virtual host on my local web server (per this question, Config problem with Apache 2 on Win 7).

I'm using Apache 2.2 on Win 7, as part of Zend Server.

At the moment, the root of my application's directory is accessible via either the virtual host (http://openco.local), or the local host name (http://localhost). How do I change this so that openco.local continues as is, but localhost points to it's original location (i.e. htdocs)?

Any assistance appreciated!

share|improve this question
up vote 1 down vote accepted

You should add another virtual host definition before the one for openco.local, as in:

<VirtualHost *:80>
   ServerName localhost
   DocumentRoot /var/www/htdocs
</VirtualHost>

That way open.local ceases to be the default virtual host.

share|improve this answer
    
Thanks Eduardo I, nice one. – Kim Apr 16 '11 at 23:08

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.