Home >Backend Development >PHP Problem >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:
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!