设置lighttpd以运行Wallabag

时间:2016-04-19 20:22:35

标签: php raspberry-pi raspbian lighttpd

我正在尝试设置lighttpd以使vhost指向wallabag安装。目前,除了将server.document-root更改为“/ var / www / wallabag / web”之外,我还没有对默认的lighttpd.conf做出很多更改。使用这些设置访问服务器IP时,我得到/ wallabag / web中包含的文件的idex,而不是自动加载app.php。如果我点击app.php该应用程序将加载正常并工作,但希望默认加载它。

如果我更改lighttpd.conf然后在index-file.names中包含app.php,我会收到404 - Not Found错误。原因似乎是它尝试加载myserver.example / login,而其他配置则转到myserver.example / app.php / login。

我假设我在设置中遗漏了一些小事,但在搜索时找不到答案。

作为参考,它是一个Raspberry Pi 2,带有安装了lighttpd的jessie版本的raspbian。

提前感谢您的任何帮助或建议。

1 个答案:

答案 0 :(得分:1)

管理解决方案:

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", 
)