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

Re: lighttpd server configs



On Fri, Mar 21, 2014 at 09:30:18AM +0000, Jonathan Dowland wrote:
> On Wed, Mar 19, 2014 at 04:12:03PM -0500, John Foster wrote:
> > However, when I try to use http://localhost. or http://127.0.0.1  or
> > the actual IP address of the computer on my network, it fails. This
> > pops up in the url bar of the browser:
> > 
> > http://www.physicswiki.net//index.php?title=Main_Page
> > 
> > It appears that the server is redirecting the request properly except
> > for the double forward slash marks & removing one of them does not fix
> > the issue; the lighttpd.conf file is below;
> snip
> > > $HTTP["host"] == "www.physicswiki.net" {
> > >   server.document-root = "/var/www/" 
> > >   }
> 
> FWIW I find it best not to modify lighttpd.conf but to put vhost
> configuration in its own file in /etc/lighttpd/mods-available and
> symlink to mods-enabled (via lighttpd-enable-mod), but that's merely
> a style/tidiness issue.
> 
> If you remove trailing slash from 'document-root', above, what happens?

I've been thinking about this a bit more and I suspect the redirection
might be occuring in mediawiki itself. When setting it up, did you
specify a path or URI with a trailing slash? Check your
LocalSettings.php file. (not sure if it's also worth checking the DB
tables for any hard-coded bits, but I suspect it would be in the
LocalSettings file).

I find the "HEAD" tool from the libwww-perl package very useful for
diagnosing these sorts of problems, by the way, especially with the
'-S' flag, which shows you all HTTP redirects (example):

$ HEAD -S alcopop.org
HEAD http://alcopop.org
301 Moved Permanently
HEAD http://jmtd.net/
200 OK
Connection: close
Date: Fri, 21 Mar 2014 10:29:12 GMT
Accept-Ranges: bytes
ETag: "1108126527"
Server: lighttpd/1.4.31
Content-Length: 3222
Content-Type: text/html; charset=UTF-8
Last-Modified: Thu, 20 Mar 2014 17:30:16 GMT


Reply to: