4
4
4sadly2020-01-30 20:18:30
Nginx
4sadly, 2020-01-30 20:18:30

Why does nginx give php file for download?

Why does nginx give php file for download?

server {

     listen 80;

     listen [::]:80;

     root /var/www/variorstar.com/html;

     index index.php index.html index.htm index.nginx-debian.html;

     server_name variorstar.com www.variorstar.com;

     location / {
  index index.php index.html index.htm;
        try_files       $uri $uri/      =404;
     }

}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex1478, 2020-01-30
@4sadly

You need to specify that php files should not be given, but transferred to php-fpm execution
https://wiki.debian.org/ru/nginx/nginx+php-fpm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question