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]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux