Answer the question
In order to leave comments, you need to log in
Why does it download instead of viewing the page?
I installed the Lemp stack on debian 7, I read somewhere that xginx is better than Apache, so I decided to install it, but there is a problem, it downloads the info.php file instead of viewing it, tell me what's the matter, maybe I configured it wrong somehow?
Answer the question
In order to leave comments, you need to log in
nginx by itself doesn't work with php. You need to use php-fpm.
Google nginx+php-fpm.
In the simplest case, deliver php-fpm (the package may be called php5-fpm) and add something like this to the nginx config
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question