Article:
  Location, Location, Location: Tips for Storing Web Site Files
Subject:   Re: Use NetInfo Manager instead of /etc/hosts and other comments
Date:   2003-05-20 16:28:39
From:   maarky
Response to: Re: Use NetInfo Manager instead of /etc/hosts and other comments

Quote "As for using 'NameVirtualHost *', yes, this works fine if you only intend to use one virtual host."


I use 'NameVirtualHost *' and yet I have no problems despite having set up 12 virtual hosts. From my experiences explicitly naming 127.0.0.1 is not necessary. I could be overlooking something, but it does not seem to be affecting any aliases, though the only ones I have are the standard icons and manual aliases which are there by default and they work fine in all of my virtual domains.


You mentioned there would be problems using "other projects in your Sites folder *without* using Alias or VirtualHost". What do you mean by this? I don't have any problems with the sites folders in /Library/WebServer/Documents or /Users/userName/Sites by going to localhost or localhost/~username. If we don't specify 127.0.0.1 which virtual host are we sent to? Am I missing something because everything at least seems to be working just fine for me.


Thanks

Main Topics Newest First

Showing messages 1 through 1 of 1.

  • Re: Use NetInfo Manager instead of /etc/hosts and other comments
    2003-05-23 12:39:31  anonymous2 [View]

    I'm also using "NameVirtualHost *" without problems; I'm hosting a couple of real web sites on my Cube, connecting via an Airport base to internet.

    One additional thing: Since Apple updates often overwrites http.conf, add

    Include /private/etc/httpd/virtual.conf

    at the bottom of httd.conf and add all virtual host settings in this file like this:

    NameVirtualHost *

    <VirtualHost *>
    ServerName "www.wigzell.net"
    DocumentRoot "/Library/WebServer/Documents"
    </VirtualHost>

    <VirtualHost *>
    ServerName "www.wigzell.se"
    DocumentRoot "/Library/WebServer/wigzell.se"
    </VirtualHost>

    Using this, you only have to re-add the first line after a system update