我有一个设置了
PHP-FPM的Nginx HTTP服务器,几乎一切正常.我希望能够转到path / to / file并且它给了我index.PHP?url = path / to / file,它确实如此.但是,它下载实际的PHP,它不会在浏览器中执行它.我不确定是什么原因造成的.
Nginx配置:
server { listen 80; server_name sandBox.domain.tld; access_log /path/to/domain/log/sandBox.access.log; error_log /path/to/domain/log/sandBox.error.log; location / { root /path/to/sandBox; index index.PHP; if (!-e $request_filename) { rewrite ^/beta/(.+)$/beta/index.PHP?url=$1 break; } } location ~ \.PHP${ fastcgi_pass 127.0.0.1:9000; fastcgi_index index.PHP; include /usr/local/Nginx/conf/fastcgi_params; fastcgi_param SCRIPT_FILENAME /path/to/sandBox$fastcgi_script_name; }