我从 Apache 更改为 Nginx,现在遇到了一些问题。
http://devserver/monitor/web
我有一个 Symfony 项目,我收到 404 错误http://devserver
我一直收到这条消息File not found.
这是我的/etc/nginx/conf.d/default.conf
文件的样子:
server {
listen 80;
server_name devserver;
location / {
root /var/www/html;
index index.php;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
}
Run Code Online (Sandbox Code Playgroud)
有什么问题吗?