Home >Backend Development >PHP Tutorial >nginx cannot parse php script

nginx cannot parse php script

不言
不言Original
2018-04-16 09:05:424763browse

The content of this article is about the problem that nginx cannot parse php scripts. It has certain reference value. Friends in need can refer to it


1. View Is nginx.conf configured correctly?

Correct format:
location ~ .php$ {
root / usr/share/nginx/html; #Can be placed globally
fastcgi_pass 127.0.0.1:9000; #php-fpm default port should not be changed to 80
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name;
include fastcgi_params;

}

2. Check whether php-fpm is started ps -aux |grep php

Started:


Related recommendations:

Causes and solutions for errors when starting php-fpm under nginx

PHP uses Nginx to implement reverse To agent










The above is the detailed content of nginx cannot parse php script. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn