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>
Read More:
- Ubuntu 20.04 builds nginx 1.18.0 and MAC file transfer / download to server
- Solve the problem of starting nginx nginx.pid error
- Nginx startup error: nginx: [error] open() “/ var / run / nginx/ nginx.pid The solution of “failed (2: no such file or directory)”
- nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
- nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
- CentOS7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument?
- /var/run/nginx/nginx.pid” failed (2: No such file or directory)
- nginx: [error] open() “/run/nginx.pid” failed (2: No such file or directory)
- nginx: open() “/var/run/nginx.pid“ failed (2: No such file or directory)
- Apple computer download file automatically with suffix problem solving
- nginx: [error] open() “/usr/local/var/run/nginx.pid” failed (2: No such file or directory)
- How to solve the problem of “unable to open include file:” graphics. H “: no such file or directory”
- An idea to solve Warning move_uploaded_file, failed to open stream in the process of php uploading files
- PHP big file upload problem (500m or above)
- nginx: [error] invalid PID number ““ in “/data/nginx/logs/nginx.pid“
- How to solve the problem of error 15: file not found when Linux starts
- How to solve the problem of “unable to open source file XXXXX. H” in VS development?
- Nginx error: nginx: [error] invalid PID number “” in “/run/nginx.pid”
- Content rendering error: a solution to the problem of zero Download document cannot be opened
- Google cloud disk: too many users have recently viewed or downloaded this file. Please try to access this file later. (How to Bypass Google Drive Download Limit (Quota Exceeded) Error)
- configure nginx li> ul>