Nginx mit PHP (Rocky)
Version vom 10. November 2025, 19:13 Uhr von Thomas.will (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „*dnf install nginx php-fpm -y *systemctl enable --now nginx php-fpm *echo "<?php phpinfo(); ?>" > /usr/share/nginx/html/info.php *vi /etc/nginx/conf.d/default.…“)
- dnf install nginx php-fpm -y
- systemctl enable --now nginx php-fpm
- echo "<?php phpinfo(); ?>" > /usr/share/nginx/html/info.php
- vi /etc/nginx/conf.d/default.conf
server {
listen 80;
root /usr/share/nginx/html;
index index.php index.html;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
}
}
- systemctl reload nginx
- http://10.20.10.12/info.php prüfen