Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Sep 24, 2010 3:23 pm 
Offline
Newbie

Joined: Fri Sep 24, 2010 3:17 pm
Posts: 4
OK, so I'm hosting a site for a client. It's setup in as a vhost in apache2, same as my personal site. Both load fine in any modern browser... but a customer of my client called and said she was seeing a 410 error. I checked on several browsers and... nope, loads fine. So I installed lynx... and can provoke the error.

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):


<VirtualHost *:80>
ServerAdmin someone@somewhere.com
ServerName www.mysite.org
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
</VirtualHost>

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?


Top
   
 Post subject:
PostPosted: Fri Sep 24, 2010 4:41 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Bit weird...I'm thinking you have some sort of security software (mod_security perhaps?) that is blocking text based browsers i.e. lynx.

What's in your apache error logs?


Top
   
 Post subject:
PostPosted: Fri Sep 24, 2010 5:49 pm 
Offline
Newbie

Joined: Fri Sep 24, 2010 3:17 pm
Posts: 4
Oddly there are no entries indicating an error in /var/log/apache2/error.log (well there's a lot of favicon errors and some hacking attempts but nothing resulting from loading the index.html file in Lynx). Nothing in the site error.log either (/var/www/mysite).

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 10_6_4; 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.


Top
   
 Post subject:
PostPosted: Fri Sep 24, 2010 8:11 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Can't see why http 1.0 would bring up a 410.

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.


Top
   
 Post subject:
PostPosted: Fri Sep 24, 2010 8:32 pm 
Offline
Newbie

Joined: Fri Sep 24, 2010 3:17 pm
Posts: 4
I was googling around and saw some information about http 1.0 clients having issues with virtual hosts on Apache... and the 410 errors in the logs are all from 1.0 clients, none from 1.1. Example, http://httpd.apache.org/docs/2.0/vhosts/examples.html

"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.


Top
   
 Post subject:
PostPosted: Fri Sep 24, 2010 9:17 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Interesting, I don't encounter that issue on my test ubuntu box
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"


Top
   
 Post subject:
PostPosted: Sat Sep 25, 2010 5:49 pm 
Offline
Newbie

Joined: Fri Sep 24, 2010 3:17 pm
Posts: 4
Could you post the conf file for that virtual host (from /sites-enabled)?

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.


Top
   
 Post subject:
PostPosted: Sat Sep 25, 2010 7:14 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
<VirtualHost *:80>
ServerName test.co.uk.local
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
</VirtualHost>


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)
mpm_prefork_module (static)
http_module (static)
so_module (static)
rewrite_module (shared)
authz_host_module (shared)
actions_module (shared)
mime_module (shared)
alias_module (shared)
dir_module (shared)
cgi_module (shared)
php5_module (shared)
log_config_module (shared)
Syntax OK


Note this isn't a standard ubuntu apache installation, I compiled it myself.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group