Nginx browses.php files into downloads: this is because Nginx is not set to pass to the PHP interpreter
when it touches PHP files
- check if the php-fpm process is working properly
ps aux|grep 'php-fpm'
Open PHP – FPM
- li> ul>
service php-fpm start
- configure nginx li> ul>
ocation ~ \.php$ { fastcgi_pass 127.0.0.1:9000;#php-fpm的默认端口是9000 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
div>
- configure nginx li> ul>