打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
How to install ligh-t-t-pd with php?
How to install lighttpd with php?
9favorite1
I've installed lighttpd, and it is working fine. I've tried to install php5, as it is described here but when I try the last step
sudo service lighttpd force-reloadI get:
[FAIL] Reloading web server configuration: lighttpd failed!and php is not working.
My lighttpd configuration can be found at http://pastebin.com/eagG4SwF:
server.modules = ( "mod_fastcgi", "mod_access", "mod_alias", "mod_compress", "mod_redirect",# "mod_rewrite",) server.document-root = "/mnt/www"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" server.dir-listing = "enable" dir-listing.encoding = "utf-8"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" )# default listening port for IPv6 falls back to the IPv4 portinclude_shell "/usr/share/lighttpd/use-ipv6.pl " + server.portinclude_shell "/usr/share/lighttpd/create-mime.assign.pl"include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
debian web-server
shareimprove this question
edited Jul 25 '12 at 10:31
Mark Booth
1,7081028
asked Jul 19 '12 at 13:50
Euphorbium
16518
1
There is a problem with the configuration file; please post it. – Alex Chamberlain Jul 19 '12 at 14:00
here is my lighttpd configuration pastebin.com/eagG4SwF – Euphorbium Jul 19 '12 at 14:16
2 Answers
activeoldestvotes
2accepted
I've got mine working by following instruction from Running a lightweight webserver on the Raspberry Pi (lighttpd).
Summary of the steps required following the link above.
Install lighttpd -> sudo apt-get install lighttpd
Install mysql database (optional) -> sudo apt-get install mysql-server mysql root password will be prompt upon completion of installation
Install PHP -> sudo apt-get install php5-common php5-cgi php5 php5-mysql
NOTE it's important to install in the order listed above. If you try to install php5 without first installing the php5-cgi package then it will install Apache as well, which we don't want for this light-weight lighttpd server.
Install php mysql libraries -> sudo apt-get install php5-mysql
Enable lighttpd to handle php -> sudo lighty-enable-mod fastcgi-php followed by reloading lighttpdsudo service lighttpd force-reload
Set permission for /var/www -> sudo chown www-data:www-data /var/www, then allow group to write to the dir sudo chmod 775 /var/www, followed by adding pi to the www-data group sudo usermod -a -G www-data pi
Logout/Login to pickup group permission so pi can also write to the /var/www dir
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
ubuntu下配置apache php mysql
Ubuntu 14.04 -- install application
Ubuntu18.04搭建个人网盘owncloud
Ubuntu14.4.1下LAMP的环境配置,超详细
ubuntu 12.04 LTS下安装apache+php+mysql+phpmyadmin
Ubuntu Linux系统架设cacti监控服务
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服