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

nginx cannot parse php script

不言
Release: 2023-03-23 21:42:02
Original
4829 people have browsed it

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!

Related labels:
Statement of this Website
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
Latest Issues
Error restarting nginx
From 1970-01-01 08:00:00
0
0
0
server - Nginx configuration webapp problem
From 1970-01-01 08:00:00
0
0
0
Nginx default.conf problem
From 1970-01-01 08:00:00
0
0
0
centos7 - NGINX exception occurs
From 1970-01-01 08:00:00
0
0
0
nginx load balancing
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template