duanke1984 2016-04-19 20:22
浏览 89

设置lighttpd以运行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.

  • 写回答

1条回答 默认 最新

  • dsfadsa08911 2016-04-20 08:25
    关注

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

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大