Hallo zusammen,
Ich bin mal wieder dazugekommen an meinem Server weiterzubasteln allerdings funktioniert mein php-fpm nicht mehr allerdings weiß ich nicht so wirklich wo ich nach dem Fehler suchen soll.
Eigentlich soll grocy (eine Haushaltswebapp) mit nginx erreichbar sein. da bekomme ich dann alerdings einen 502:Bad Gateway fehler.
in den logs von nginx steht:
2021/02/10 14:17:10 [crit] 382#382: *3 connect() to unix:/run/php-fpm/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 93.104.6.12, server: grocy.umwelt-zentrum.selfhost.co, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "grocy.umwelt-zentrum.selfhost.co"
Das wäre die ausgabe von systemctl status php-fpm.service
* php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/php-fpm.service.d
`-override.conf
Active: failed (Result: exit-code) since Wed 2021-02-10 17:49:07 CET; 27min ago
Process: 459 ExecStart=/usr/bin/php-fpm --nodaemonize --fpm-config /etc/php/php-fpm.conf (code=exited, status=226/NAMESPACE)
Main PID: 459 (code=exited, status=226/NAMESPACE)
Feb 10 17:49:07 valhalla systemd[1]: Starting The PHP FastCGI Process Manager...
Feb 10 17:49:07 valhalla systemd[459]: php-fpm.service: Failed to set up mount namespacing: /run/systemd/unit-root/usr/share/nginx/html/grocy: No such file or directory
Feb 10 17:49:07 valhalla systemd[459]: php-fpm.service: Failed at step NAMESPACE spawning /usr/bin/php-fpm: No such file or directory
Feb 10 17:49:07 valhalla systemd[1]: php-fpm.service: Main process exited, code=exited, status=226/NAMESPACE
Feb 10 17:49:07 valhalla systemd[1]: php-fpm.service: Failed with result 'exit-code'.
Feb 10 17:49:07 valhalla systemd[1]: Failed to start The PHP FastCGI Process Manager.
[led@valhalla ~]$ systemctl restart php-fpm.service
und die nginx-Konfiguration der Seite
server {
server_name grocy.umwelt-zentrum.selfhost.co;
access_log /var/log/nginx/192.168.1.133.access.log;
error_log /var/log/nginx/192.168.1.133.error.log;
# listen 8080;
root /usr/share/webapps/grocy/public/;
index index.html index.htm index.php;
# php config let nginx talk to php socket
location / {
try_files $uri /index.php;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
# Mitigate https://httpoxy.org/ vulnerabilities
fastcgi_param HTTP_PROXY "";
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
# include the fastcgi_param setting
include fastcgi_params;
# SCRIPT_FILENAME parameter is used for PHP FPM determining
# the script name.
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/grocy.umwelt-zentrum.selfhost.co/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/grocy.umwelt-zentrum.selfhost.co/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = grocy.umwelt-zentrum.selfhost.co) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name grocy.umwelt-zentrum.selfhost.co;
listen 80;
return 404; # managed by Certbot
}
Ich hoffe mal jemand kann mich in die richtige Richtung weißen, vielen Dank schonmal 😉
LG
Thorgrimsson