Talk:Production LAMP system: Lighttpd + PHP + MySQL

From Alpine Linux

Help/advice requested by AlexHammer

I follow the tutorial and everything works BUT: the last part to secure Adminer is not working.

First: The cat command does not write the "$HTTP" into the mod_adminer.conf file
cat > /etc/lighttpd/mod_adminer.conf << EOF # NOTE: this requires mod_alias alias.url += ( "/adminer/" => "/var/www/webapps/adminer/" ) $HTTP["url"] =~ "^/adminer/" { # disable directory listings dir-listing.activate = "disable" } EOF


Second: As soon as I do this last command I can't restart the lighttpd server anymore.

checkssl="";checkssl=$(grep 'include "mod_adminer.conf' /etc/lighttpd/lighttpd.conf);[[ "$checkssl" != "" ]] && echo listo || sed -i -r 's#.*include "mod_cgi.conf".*#include "mod_cgi.conf"\ninclude "mod_adminer.conf"#g' /etc/lighttpd/lighttpd.conf

Any ideas what to do?

— Preceding unsigned comment added by AlexHammer (talkcontribs) 11:59, 20 September 2021

Hello, I would recommend using a proper text editor (such as nano or vi) to add the contents of the mod_adminer.conf file. In the example from the page using the cat commands, the text you need to insert is between the two EOFs.
Also please sign your posts using ~~~~ Thanks!
zcrayfish (talk) 21:02, 10 October 2021 (UTC)

duplicate index-file.names in Lighttpd + PHP-FPM section and lighttpd.conf

I guess we'd want to keep it in /etc/lighttpd/mod_fastcgi_fpm.conf This is how I fixed it, but it could be cleaner than sed -e '/index-file.names/ s/^#*/#/' -i /etc/lighttpd/lighttpd.conf --Not5am (talk) 08:48, 30 May 2023 (UTC)