Re: Apache Virtual Server

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

 



On Tue, 2009-04-28 at 09:58 -0700, Dennis Kaptain wrote:
> Just a little more information from /var/log/httpd/access_log
>  
> When I request http://localhost I get an entry that says
> 127.0.0.1 - - [28/Apr/2009:11:52:08 -0500] "GET / HTTP/1.1" 200 3488 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042708 Fedora/3.0.10-1.fc10 Firefox/3.0.10"
>  
> When I request http://confianza I get an entry that says
> 127.0.0.1 - - [28/Apr/2009:11:53:06 -0500] "GET / HTTP/1.1" 200 3488 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042708 Fedora/3.0.10-1.fc10 Firefox/3.0.10"
>  
> When I request http://confianzazend I get an entry that says
> 127.0.0.1 - - [28/Apr/2009:11:53:54 -0500] "GET / HTTP/1.1" 200 3492 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042708 Fedora/3.0.10-1.fc10 Firefox/3.0.10"
>  
> All three entries are identical get requests for /

That's normal.  They're each requests for the default root document.

> Yet the php command <?php echo $_SERVER['SERVER_NAME']."<br>\n"; ?>
> in /var/www/html/index.php
> prints out 'localhost', 'confianza', or 'confianzazend' depending on
> what url I call.

Nothing unusual in that, either.  That's the hostname in the request
from the client.  You could put in a bogus one, and get the same
response.  e.g. add bogus to 192.168.0.4 in the hosts file, then request
a page from http://bogus.  You'll get that sort of thing from your PHP
file, even though you've not set up any "bogus" virtual host.

I'd be inclined to set up different logging files in each virtual host,
so you could see exactly which host is reacting to what.  Open up a few
consoles, and do "tail -f /var/log/httpd/confianza" in one, and similar
commands in the other, so you can watch each one live, as you make
different requests.

Alternatively, you can do custom logs which also includes hostnames in
the log data.

-- 
[tim@localhost ~]$ uname -r
2.6.27.21-78.2.41.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux