0

我有一个只是由于某种原因没有触发的位置。我已经尝试了各种不同顺序的路线,但它仍然不起作用。当用户出现并请求 /_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;
    }
}

谁能发现我的(可能是愚蠢的!)错误是什么?

提前致谢!:)

4

1 回答 1

0

没关系,我解决了!由于某种原因,在 nginx 上使用 reload 命令不起作用。停止并开始,瞧!

于 2012-10-10T23:11:31.360 回答