410 error... on some user agents
In looking at error.log and access.log Firefox, Chrome, etc all get a 200 return code and load things fine. However, lynx and the google webmasters bot do NOT. They get a 410 error.
The vhost setup isn't complex - here's the file for my personal site (things anonymized slightly):
ServerName
ServerAlias mysite.org
Indexes + Directory Root.
DocumentRoot /var/www/mysite/
DirectoryIndex index.html
Logfiles
ErrorLog /var/www/mysite/error.log
CustomLog /var/www/mysite/access.log combined
I can't see anything in Googling around that would explain this. Note that the main domain is fine - it does NOT suffer from this issue at all.
THought?
7 Replies
What's in your apache error logs?
The access.log entries look like this:
[24/Sep/2010:12:00:39 -0700] "GET /index.html HTTP/1.0" 410 457 "-" "Lynx/2.8.7pre.6 libwww-FM/2.14 SSL-MM/1.4.1"
[24/Sep/2010:14:35:45 -0700] "GET /index.html HTTP/1.1" 200 378 "-" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 1064; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.53 Safari/534.3"
I'm wondering if the 410 is due to the useragent using http 1.0? Very odd.
410 means "Gone" as in the page has been removed and links should be removed.
Do you have any security software installed that maybe interfering?
Try dropping apache's error logging down to DEBUG and access it, see if it splurts out more information.
"We have a server with two name-based vhosts. In order to match the correct virtual host a client must send the correct Host: header. Old HTTP/1.0 clients do not send such a header and Apache has no clue what vhost the client tried to reach (and serves the request from the primary vhost)."
I'll drop the error level to DEBUG though, that's a good idea. Thanks for the reply.
Here's an access log snippet:
192.168.56.1 - - [24/Sep/2010:18:15:43 -0700] "GET / HTTP/1.0" 200 23660 "-" "Lynx/2.8.7rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7l"
Note that I don't get this on the main (default) domain, only on other vhosts. So the site that's listed as 000-default in /etc/apache2/sites-enabled is fine. It's other name based vhosts that are giving me an issue.
Action php52-cgi /php52-cgi/php-cgi
AddHandler php52-cgi php5 php4 php php3 php2 phtml
ScriptAlias /php52-cgi /custom/php/bin
DocumentRoot /host/test/public_html
DirectoryIndex index.php
That's it and I'd thought I'd dump my apache modules too maybe there's something with one of those
Loaded Modules:
core_module (static)
mpmpreforkmodule (static)
http_module (static)
so_module (static)
rewrite_module (shared)
authzhostmodule (shared)
actions_module (shared)
mime_module (shared)
alias_module (shared)
dir_module (shared)
cgi_module (shared)
php5_module (shared)
logconfigmodule (shared)
Syntax OK
Note this isn't a standard ubuntu apache installation, I compiled it myself.