Home > Backend Development > PHP Problem > nginx cannot access php

nginx cannot access php

Release: 2023-02-28 08:16:02
Original
3874 people have browsed it

nginx cannot access php

In the nginx configuration, incorrect configuration of php will cause nginx to be unable to access php.

Cannot access php and cannot find the file. Modify the following configuration

nginx.conf:

nginx cannot access php

location ~ \.php$ {
        proxy_pass   http://127.0.0.1:80;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
        #fastcgi_param SCRIPT_FILENAME /$document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/html$fastcgi_script_name;
        include        fastcgi_params;
    }
Copy after login

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

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template