Re: [users@httpd] Rerouting Localhost (to XAMPP home page)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Rob Wilkerson <r.d.wilkerson@xxxxxxxxx> wrote:
You should be able to do this one of two ways:

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

I discovered that DocumentRoot is already set up as you susggested...

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 webmaster@xxxxxxxxxxxxxxxxxxxxxx
#    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 webguy@xxxxxxxxxx
    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.
[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux