N
N
Nikita2015-06-23 12:19:52
Debian
Nikita, 2015-06-23 12:19:52

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

2 answer(s)
E
Ergil Osin, 2015-06-23
@jkvint

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;
}

O
Optimus, 2015-06-23
Pyan @marrk2

Execution prohibited, see user rights or htaccess

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question