Reputation: 29139
I've a problem with my lighttpd setup. Here is where the problem begins:
server.document-root = vhosts_dir + "/" + server.name + "/wp"
Inside that directory are all files. Now, on this site is an image which has an url like
http://example.com/wp/uploads.....
Inside lighttpd
this will translate to
`/var/www/vhosts/example.com/wp/wp/...
Unfortunately I cannot remove the wp
part from the document-root
:(
So I tried to rewrite this by removing one of the wp
s as follows
url.rewrite-once = (
"^(.*)/wp/(.*)$" => "$1/$2"
)
Unfortunately this doesn't seem to have zero effect, nothing seems to be modified. Any idea how to fix this?
Upvotes: 0
Views: 971
Reputation: 2379
One option is to create a symlink wp -> . inside /var/www/vhosts/example.com/wp/
Another is to use lighttpd mod_alias to map requests to /wp to the document-root:
alias.url = ( "/wp/" => "/var/www/vhosts/example.com/wp/" )
https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModAlias
Upvotes: 1