Hi all,
I am new to Os X adn Apache. I have httpd running and would like to establish virtual hosts on my laptop for testing/learning.

I have done the following for virtual hosts "main" and "alternate"

Added to /etc/hosts:

127.0.0.1    main.localhost
127.0.0.1    alternate.localhost

Original htdocs known as Documents was in /Library/WebServer/

I have added:
   for "main"  :  /Library/WebServer/main/Documents
   for "alternate" : /Library/WebServer/alternate/Documents

in /etc/apache2/extra/httpd-vhosts.conf I have this

NameVirtualHost *:80

<VirtualHost *:80>
  DocumentRoot  "Library/WebServer/main/Documents"
  ServerName    main.localhost
</VirtualHost>

<Virtualhost *:80>
  DocumentRoot "Library/WebServer/alternate/Documents"
  ServerName  "alternate.localhost"
</VirtualHost>

The line
"Include /private/etc/apache2/extra/httpd-vhosts.conf" has been uncommented.

In httpd.conf
  DocumentRoot "/Library/WebServer"

  <Directory "/Library/Webserver">
      . . . .
  </Directory>


Also I note that there are two httpd.conf files. One in /etc/httpd and the other in /etc/apache2/. I am not, at this point sure which is used, so I have edited them to be identical.


So, my question:
1.  Is /etc/hosts correct or should it be
     127.0.0.1  main etc.
2.  Is httpd-vhost.conf set up corectly?

TIA

Bob Hartung

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to