我有一个仅仅由于某种原因没有触发的位置。我已尝试过各种不同订单的路线,但仍无效。当用户出现并请求/ _hostmanager /它应该触发时,而是从路由获取index.php页面。
服务器配置文件是:
server {
index index.php index.html;
root /var/www/html;
server_name _;
listen 80;
# Logging
error_log /var/log/httpd/elasticbeanstalk-error_log;
# Route standard requests
location / {
try_files $uri $uri/ /index.php;
}
# Proxy Hostmanager
location /_hostmanager/ {
proxy_pass http://127.0.0.1:8999/;
}
# Include PHP
location ~ \.php {
# CGI Configuration
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
# Zero-day exploit defense
try_files $uri $uri/ /index.php =404;
# Use socket for connection
fastcgi_pass unix:/tmp/php5-fpm.sock;
}
# Cache control
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
log_not_found off;
expires 360d;
}
# Disable hidden files
location ~ /\. {
deny all;
}
}
有人能发现我的(可能是愚蠢的!)错误吗?
提前致谢! :)
答案 0 :(得分:0)
没关系,我解决了!出于某种原因,在nginx上使用reload命令无效。停了下来,瞧瞧!