Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

How to run php-file on nginx-server?

$
0
0

currently I'm trying to run a php file on my nginx server. I downloaded all packages, changed the config file, but it is still not working. I can open my index.html, but when I open my php file it just downloads it.
enter image description here

enter image description here

enter image description here

My code of the config file:server {listen 80 default_server;

root /var/www/html;index index.html index.htm index.php index.nginx-debian.html;server_name test;location / {    try_files $uri $uri/ =404;}location ~ \.php$ {    try_files $uri $uri/ =404;    include snippets/fastcgi-php.conf;    fastcgi_pass unix: /run/php/php8.0-fpm.sock}

}

Please help me.


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>