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

nginx cannot access php

尚
Original
2019-10-31 13:18:213864browse

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;
    }

The above is the detailed content of nginx cannot access php. 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