machan is there anybody who knows how to configure nginx to use php on a server?
after doing everything, I get '502 Bad Gateway' error from the server
i'm stuck for a day troubleshooting the error but couldn't find any..
this is the guide I followed> https://www.techsupportpk.com/2019/04/how-to-set-up-lemp-stack-ubuntu-1904.html
can you spot any fault in this config? (which I've linked to /etc/nginx/sites-enabled/)
after doing everything, I get '502 Bad Gateway' error from the server
i'm stuck for a day troubleshooting the error but couldn't find any..
this is the guide I followed> https://www.techsupportpk.com/2019/04/how-to-set-up-lemp-stack-ubuntu-1904.html
can you spot any fault in this config? (which I've linked to /etc/nginx/sites-enabled/)
NGINX:
server {
listen 80;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name localhost;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}