You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Slive <js...@gmail.com> on 2005/06/14 03:50:53 UTC

Re: [users@httpd] still content negotiation problems

On 6/13/05, Marco Scoffier <ma...@metm.org> wrote:
> I'm using OpenBSD's apache (which does not have many "standard" modules
> compiled):
> 
>  compiled mod_negotiation and mod_mime (which I am not 100% sure is needed):
>    cd /usr/scr/usr.sbin/httpd/modules/standard
>        apxs -i -a -c mod_negociation.c
>        apxs -i -a -c mod_mime.c

Ouch. OpenBSD doesn't have mod_mime by default?  That's crazy.

You might find it difficult to get help here with OpenBSD's version of
apache, since they don't really include apache, but rather a forked
version with some of their own patches and without patches from recent
apache versions.  I'm not sure how far it diverges from the official
version at the moment, but I believe it is significant and growing. 
Hence it is pretty much impossible for us to know if your problem is
in your configuration, in the apache source code, or in something that
openbsd did to apache.

> <Directory /var/www/htdocs/langnego/ >
>        Options +MultiViews
>        AddLanguage fr .fr
>        AddLanguage en .en
>        LanguagePriority fr en
>        DirectoryIndex index
> </Directory>
> 
> Here's my directory structure (you can test at http://langnego.no-ip.org ):
> 
> $ ls /var/www/htdocs/langnego/
> index.html.fr     index.html.html   test.html.fr      test.html.html
> 
> I set my browser to prefer fr which I can tell from the custom log (see below)
> the default directory returns the english page.  A request for test.html
> returns a 404, and just when you thought +MultiViews wasn't working a request
> for test returns the english text.html.html .  When I go to Google.com I get
> their french page correctly...
> 
> 
> 64.81.200.243 - - [13/Jun/2005:15:44:30 -0400] "GET / HTTP/1.1" 200 17 "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050514 Firefox/1.0.4" "fr,en;q=0.5"
> 64.81.200.243 - - [13/Jun/2005:15:44:38 -0400] "GET /test.html HTTP/1.1" 404 215 "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050514 Firefox/1.0.4" "fr,en;q=0.5"
> 64.81.200.243 - - [13/Jun/2005:15:48:07 -0400] "GET /test HTTP/1.1" 200 17 "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050514 Firefox/1.0.4" "fr,en;q=0.5"

It might be helpful to see what is in the error log.

One thing missing from your config is a test.html.en.  This is
necessary so that someone requesting "en,fr;q=0.5" will get the
english page.  But the fact that that is missing doesn't explain why
request test.html doesn't get you something.  That is a little
curious.

Joshua

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: still content negotiation problems

Posted by Marco Scoffier <ma...@metm.org>.
Hey Joshua,

Thanks for your response. 
Just replying to snips 'cause I figured it out.

On Mon, 13 Jun 2005 21:50:53 -0400, Joshua Slive wrote:

> Ouch. OpenBSD doesn't have mod_mime by default?  That's crazy.
> 

In fact OpenBSD does have mod_mime and mod_negotiation compiled in, I've
gotten so used to them ripping out things for security reasons, that
somewhere along in my trying to get this to work I came to this false
conclusion. I had forgotten about httpd -l .   Takes writing out the email
to find the problem... :)

It seems my extra LoadModule lines had been messing things up.  I removed
them and things work as expected.  

I've even added a some UTF-8 auto-negotiation 
and Japanese pages with 
 AddCharset UTF-8 .ja 
 AddCharset UTF-8 .fr

Nice !

> One thing missing from your config is a test.html.en.  This is necessary
> so that someone requesting "en,fr;q=0.5" will get the english page.  But
> the fact that that is missing doesn't explain why request test.html
> doesn't get you something.  That is a little curious.
> 

Thanks for the tip. I've symlinked page.html.html to page.html.en

Server is negotiating happily, and it's still too hot in NYC.

Thanks,

-- 
Marco



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org