Talk:Production LAMP system: Lighttpd + PHP + MySQL: Difference between revisions
AlexHammer (talk | contribs) (Created page with "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.c...") |
AlexHammer (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
'''First:''' | '''First:''' | ||
The cat command does not write the "$HTTP" into the mod_adminer.conf file | 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 | # NOTE: this requires mod_alias | ||
alias.url += ( | alias.url += ( | ||
Line 13: | Line 13: | ||
dir-listing.activate = "disable" | dir-listing.activate = "disable" | ||
} | } | ||
EOF | EOF | ||
'''Second:''' | '''Second:''' | ||
As soon as I do this last command I can't restart the lighttpd server anymore. | 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? | Any ideas what to do? |
Revision as of 15:58, 20 September 2021
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?