Nginx server does not parse PHP ~ Phpcodeserver{listen8881;server_named2.test.com?indexindex.htmlindex.htm index. php; roothomewebd2.test. comroot; location {ind nginx server does not parse PHP ~
PHP code
server{ listen 8881; server_name d2.test.com; index index.html index.htm index.php; root /home/web/d2.test.com/root/; location / { index index.php index.html; if (!-e $request_filename){ #rewrite ^/(.*)$ /index.php?/$1? last; rewrite (.*) /index.php/$1; } } location ~ \.php { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_script_name; access_log off; }}
This is my project. when I access this project, nginx directly downloads the file instead of parsing PHP, and the format is as follows: "IB2EreFS. part, but the file content is the php content.
I have never used nginx before. how can I modify it? Thank you!