0

php files are downloading not executing in nginx

Hello,

In my server am using apache. once i have changed it to nginx, the php files starts to download instead of executing it. So i have installed php with all required packages but still the same.??

Nginx Php Php-fpm Add a comment
levi
asked Apr 21 2017

Answer

0

Check with the respective handler which is to be enabled for nginx.

Add a comment
jagannatharumugam
asked Apr 21 2017
edited Oct 05 2018
Post your Answer
0

you just check and configure your nginx.conf file like below

location ~* \.php$ {  
    fastcgi_index   index.php;  
    fastcgi_pass    127.0.0.1:9000;    
    #fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;    
    include         fastcgi_params;    
    fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;    
    fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;  
}
Add a comment
henry
asked Aug 27 2017
edited Oct 05 2018
Post your Answer