bumble
New member
Hi everyone
I’m attempting to install PHP with a NGINX web server. I’ve install PHP 8.1 and done what I think is the correct config, but i can’t reach index.php on the server. It gives a 502 Error. If I hit index.html all is well.
I did an apt install php-fpm php-mysql
I edited my .conf file.
completed a nginx -t which had no issues
restarted nginx
My config:
nginx 1.26.3
Ubuntu 22.04.5 LTS
my .conf for the domain:
Any hits on what I can try much appreciated
thanks
Susan
I’m attempting to install PHP with a NGINX web server. I’ve install PHP 8.1 and done what I think is the correct config, but i can’t reach index.php on the server. It gives a 502 Error. If I hit index.html all is well.
I did an apt install php-fpm php-mysql
I edited my .conf file.
completed a nginx -t which had no issues
restarted nginx
My config:
nginx 1.26.3
Ubuntu 22.04.5 LTS
my .conf for the domain:
NGINX:
server {
location / {
root /var/www/html/<my folder>
try_files $uri $uri/ /index.php$is_args$args;
}
server_name <domain name>;
index index.php index.html index.htm;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
(other stuff for port 443 ssl )
Any hits on what I can try much appreciated
thanks
Susan