当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Setting up lighttpd to run Wallabag

问题描述:

I am trying to set-up lighttpd to have a vhost pointing at wallabag installation. Currently I have not made many changes from the default lighttpd.conf apart from to change the server.document-root to "/var/www/wallabag/web". With those settings when accessing the server IP I get an idex of the files contained in /wallabag/web rather than it automatically loading app.php. If I click app.php the app will load fine and work, but wanting to have it load by default.

If I change the lighttpd.conf to then include app.php in the index-file.names I get a 404 - Not Found error. The reason for this appears to be that it tries to load myserver.example/login whereas with the other configuration it goes to myserver.example/app.php/login.

I am assuming there is something minor I am missing from the settings but I can't find an answer when searching.

For reference it is a Raspberry Pi 2 with the jessie version of raspbian that lighttpd is installed on.

Thanks in advance for any help or suggestions.

网友答案:

Managed to work out the solution:

server.modules = (
"mod_fastcgi",
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
)
server.document-root = "/var/www/wallabag/web"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
server.follow-symlink = "enable"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html")
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
dir-listing.activate = "disable"

url.rewrite-if-not-file = (
"^/([^?])(?:\?(.))?" => "/app.php?$1&$2",
"^/([^?]*)" => "/app.php?=$1",
"^/wiki$" => "/app.php", 
)
分享给朋友:
您可能感兴趣的文章:
随机阅读: