Rob Wilkerson <[EMAIL PROTECTED]> wrote:
You should be able to do this one of two ways:I discovered that DocumentRoot is already set up as you susggested...
1. Change your DocumentRoot directory and the associated
block to /Applications/xampp/htdocs
2. Uncomment the NameVirtualHosts directive and create a
*:80> block that has a DocumentRoot that point to
/Applications/xampp/htdocs
DocumentRoot "/Applications/xampp/htdocs"
So I tried the second option, adding this to my httpd.conf file:
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
# ServerAdmin [EMAIL PROTECTED]
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /Applications/xampp/htdocs
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
I then restarted my computer, but nothing changed; http://localhost/ still displays the standard Apache greeting. I was concerned that I might have ruined my httpd.conf file because I'm just learning how to work with it on a Mac, and I've moved, deleted and modified it several times. But the fact that http://localhost indicates it's working, right?
Do I have to substitute something meaningful for the server name? On my PC, my virtual hosts look like this:
<VirtualHost *:80>
ServerName px
ServerAlias px *.px
DocumentRoot C:\sistes\px
</VirtualHost>
So what would be the server name for the example I'm working on now - "etc."?
Thanks.
See the all-new, redesigned Yahoo.com. Check it out.