Talk:Production LAMP system: Lighttpd + PHP + MySQL: Difference between revisions

From Alpine Linux
(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...")
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Help/advice requested by AlexHammer==
I follow the tutorial and everything works BUT:
I follow the tutorial and everything works BUT:
the last part to secure Adminer is not working.
the last part to secure Adminer is not working.
Line 4: Line 6:
'''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
<br>
<nowiki>cat > /etc/lighttpd/mod_adminer.conf << EOF
# NOTE: this requires mod_alias
# NOTE: this requires mod_alias
alias.url += (
alias.url += (
Line 13: Line 16:
     dir-listing.activate = "disable"
     dir-listing.activate = "disable"
}
}
EOF''
EOF</nowiki>
 


'''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''
<nowiki>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</nowiki>
 
Any ideas what to do?
 
<!-- Template:Unsigned --><span class="autosigned" style="font-size:85%;">—&nbsp;Preceding unsigned comment added by [[User:AlexHammer|AlexHammer]] ([[User talk:AlexHammer#top|talk]] • [[Special:Contributions/AlexHammer|contribs]]) 11:59, 20 September 2021</span>


: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 <nowiki>~~~~</nowiki>    Thanks!
:[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 21:02, 10 October 2021 (UTC)


Any ideas what to do?
== 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'''
--[[User:Not5am|Not5am]] ([[User talk:Not5am|talk]]) 08:48, 30 May 2023 (UTC)

Latest revision as of 08:50, 30 May 2023

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)