Not logged in. · Lost password · Register
Forum: General Help and Support Server Setup RSS
Lighty w/ virtual host and rewrite issue.
Lighttpd and Dokuwiki
Avatar
GTNman #1
Member since Nov 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Lighty w/ virtual host and rewrite issue.
Here we go.
Server config
Lighttpd
PHP5

 I have doku wiki installed running in the physical path of /var/www/wiki (http://server/wiki) and I am using URL rewriting.  What I am trying to do is use virtual hosts to allow my users to access the site using the url http://wiki.

I have included the following line in my lighttpd.conf

$HTTP["host"] = "wiki" { server.document-root = "/var/www/wiki/" }

However, when I load the page, no media images display and the wiki links dont work properly.  If I turn [userewrite] to a 0 or 2 the site works fine using the virtual host.

Here is a the rewrite that I am using in my lighthttpd.conf

#### dokuwiki rewrite

url.rewrite-once = (
                    "^/wiki/(/|index.php)?$" => "/wiki/doku.php",                                                        
                    "^/wiki/lib/(.*)/?$" => "/wiki/lib/$1",
                    "^/wiki/_media/(.*)?\?(.*)$" => "/wiki/lib/exe/fetch.php?media=$1&$2",
                    "^/wiki/_media/(.*)$" => "/wiki/lib/exe/fetch.php?media=$1",
                    "^/wiki/_detail/(.*)?\?(.*)$" => "/wiki/lib/exe/detail.php?media=$1&$2",
                    "^/wiki/_detail/(.*)?$" => "/wiki/lib/exe/detail.php?media=$1",
                    "^/wiki/_export/([^/]+)/(.*)$" => "/wiki/doku.php?do=export_$1&id=$2",
                    "^/wiki/(?!doku.php|feed.php|robots.txt|sitemap.xml.gz)(.*)\?(.*)/?$" => "/wiki/doku.php?id=$1&$2",
                    "^/wiki/(?!doku.php|feed.php|robots.txt|sitemap.xml.gz)(.*)/?$" => "/wiki/doku.php?id=$1",
                  )

I am thinking there is something in the rewrite thats throwing it for a loop. Any input wouldbe much appreciated.
This post was edited on 2006-11-30, 00:03 by GTNman.
Avatar
GTNman #2
Member since Nov 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
I resolved the issue by removing all the /wiki/ instances in the rewrite.

now the site works with host http://wiki but not http://gtn-lnx3/wiki

how can i make it so both urls work?


works a'ok- modified my lighttpd and seems to work.
This post was edited on 2006-12-01, 21:29 by GTNman.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-17, 22:35:55 (UTC +01:00)