Wie kann der Alias ​​des Stammverzeichnisses an einen document_root-Subfloder in lighttpd umgeleitet werden?

827
skyrail

Ich habe diese Verzeichniskonfiguration:

htdocs/www -> web site pages htdocs/WEB-INF -> lib and classes, used in web pages htdocs/data -> data (images, documents) 

So mache ich es mit Apache:

htdocs/www/images/logo.gif htdocs/www/exemple/php: <? include_once $_SERVER["DOCUMENT_ROOT"]."/lib/classes/A.class.php"; $s=file_get_contents($_SERVER["DOCUMENT_ROOT"]."/data/content.txt"); ?> <a href="/images/logo.gif"> 

Dies ist Teil meines lighttpd-Conf und ahmt Apache httpd.conf nach: alias.url = ("/" => "... / htdocs / www /") server.document-root = "... / htdocs"

Leider verweist $ _SERVER ["DOCUMENT_ROOT"] auf htdocs / www anstelle von htdocs.

Wie kann ich das beheben?

0

1 Antwort auf die Frage

0
kzpm

I think you solved this by now, but if not:

Open /etc/lighttpd/lighttpd.conf and edit the value assigned to .

You should fill out the full path to your webroot. Do not forget to restart lighttpd.