首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >设置lighttpd以运行Wallabag

设置lighttpd以运行Wallabag
EN

Stack Overflow用户
提问于 2016-04-20 04:22:35
回答 1查看 362关注 0票数 0

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

如果我将lighttpd.conf更改为在index-file.name中包含app.php,我会得到一个404 - Not Found错误。出现这种情况的原因似乎是它试图加载myserver.example/login,而对于其他配置,它转到myserver.example/app.php/login。

我假设我在设置中遗漏了一些次要的东西,但我在搜索时找不到答案。

作为参考,它是安装了lighttpd的Raspberry Pi 2和raspbian的杰西版本。

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

EN

回答 1

Stack Overflow用户

发布于 2016-04-20 16:25:17

设法找出了解决方案:

代码语言:javascript
复制
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", 
)
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36728687

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档