我有一个位置,因为某些原因,它不能触发。我尝试了各种不同顺序的路由,但仍然不起作用。当用户出现并请求/_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;
}
}有没有人能发现我的(可能很愚蠢!)错误是什么?
提前感谢!:)
发布于 2012-10-11 07:11:31
不要紧,我算出来了!由于某些原因,在nginx上使用reload命令不起作用。停了又开始,瞧!
https://stackoverflow.com/questions/12828382
复制相似问题