[UE] 403 Forbiden after Ubuntu 18 to 22 Upgrade
Added by lighttpd2024 9 months ago
Hi,
I have recently upgraded my OS version and since then I'm unable to configure/run lighttpd for php files
I can access html files but not .php files when mod_fastcgi is added. I have also configured https
and here is my lighttpd.conf code for lighttpd version lighttpd/1.4.63
server.modules = ( "mod_access", "mod_alias", "mod_deflate", "mod_redirect", "mod_rewrite", "mod_accesslog", "mod_status", "mod_fastcgi", ) server.document-root = "/var/www/html" 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 index-file.names = ( "index.php", "index.html", "index.lighttpd.html" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) deflate.cache-dir = "/var/cache/lighttpd/compress/" deflate.mimetypes = ( "application/javascript", "text/css", "text/html", "text/plain" ) # default listening port for IPv6 falls back to the IPv4 port ## Use ipv6 if available include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port include_shell "/usr/share/lighttpd/create-mime.conf.pl" include_shell "/etc/lighttpd/conf-enabled/*.conf" fastcgi.debug = 1
Replies (7)
RE: 403 Forbiden after Ubuntu 18 to 22 Upgrade - Added by gstrauss 9 months ago
Fantastic failure. You did not carefully read How to get support before posting. (as instructed in #3250)
RE: [UE] 403 Forbiden after Ubuntu 18 to 22 Upgrade - Added by lighttpd2024 9 months ago
OS: Ubuntu 22.04.4 LTS
Version of lighttpd: lighttpd/1.4.63
Configuration: Attached above and here in the file
What client you used: Chrome, Edge
Did you clear your browser cache? Yes
Did you test with the most recent lighttpd release to see if your concern has already been addressed? I'm have jammy in ubuntu where the latest is 1.4.63
I have ansewered few more for you in leu of your How to get support
Could you please check
RE: [UE] 403 Forbiden after Ubuntu 18 to 22 Upgrade - Added by gstrauss 9 months ago
Once more, you did not carefully read How to get support before posting.
You clearly have not read all fourteen (14) lines of that page and run the three (3) commands. You clearly do not understand what posting your config means, since you do not understand what the word "include" means in "include_shell".
I'll be blunt. You did not post your complete config after I asked three times.
Aside, this looks wrong and probably never worked properly: include_shell "/etc/lighttpd/conf-enabled/*.conf"
Maybe it should be include "/etc/lighttpd/conf-enabled/*.conf"
RE: [UE] 403 Forbiden after Ubuntu 18 to 22 Upgrade - Added by lighttpd2024 9 months ago
Please find outputs of your 3 commands here
https://paste.lighttpd.net/vD#EssakTdbagt04FmFVvnWSzjn
Also adding the include files in shell along with lighttpd.conf
10-fastcgi.conf (141 Bytes) 10-fastcgi.conf | |||
10-ssl.conf (929 Bytes) 10-ssl.conf | |||
lighttpd.conf (1.04 KB) lighttpd.conf |
RE: [UE] 403 Forbiden after Ubuntu 18 to 22 Upgrade - Added by gstrauss 9 months ago
Repeating what I posted above
Aside, this looks wrong and probably never worked properly:
include_shell "/etc/lighttpd/conf-enabled/*.conf"
Maybe it should beinclude "/etc/lighttpd/conf-enabled/*.conf"
Your reading comprehension is poor. Please try harder.
Now that you have shared your whole config, we can all see that fastcgi is not configured. It may be loaded in server.modules
, but it is not configured. 10-fastcgi.conf
is not included in the config. Neither is 10-ssl.conf
. The Ubuntu upgrade did not make that "include_shell" mistake. Some human did and failed to test after making the change, and then failed to revert the change when that change did not work.
RE: [UE] 403 Forbiden after Ubuntu 18 to 22 Upgrade - Added by gstrauss 9 months ago
Your 10-fastcgi.conf
does not configure fastcgi for .php. Please use a search engine to find a beginner tutorial on how to configure lighttpd on Ubuntu.
RE: [UE] 403 Forbiden after Ubuntu 18 to 22 Upgrade - Added by lighttpd2024 9 months ago
Its now working, installed php-cgi
sudo apt-get install php-cgi
and added following config for fastcgi
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))
Thanks @gstrauss for include part