Nginx OS Ticket出现“重定向过多”错误

时间:2019-04-13 15:00:19

标签: nginx-config osticket

我正在尝试使用nginx stackoverflow答案使用nginx配置OSTicket: User diretive is not allowed

应用答案后,我开始收到一个新错误:重定向过多。

有人知道原因吗?

下面是我的配置

server {
    listen 80;
    server_name my.internal.helpdesk.com;
    rewrite ^ http://my.internal.helpdesk.com permanent;

    keepalive_timeout 70;

    root /var/www/html/my.internal.helpdesk.com;

    set $path_info "";

    location ~ /include {
        deny all;
        return 403;
    }

    if ($request_uri ~ "^/api(/[^\?]+)") {
        set $path_info $1;
    }

    location ~ ^/api/(?:tickets|tasks).*$ {
        try_files $uri $uri/ /api/http.php?$query_string;
    }

    if ($request_uri ~ "^/scp/.*\.php(/[^\?]+)") {
        set $path_info $1;
    }

    if ($request_uri ~ "^/.*\.php(/[^\?]+)") {
        set $path_info $1;
    }

    location ~ ^/scp/ajax.php/.*$ {
        try_files $uri $uri/ /scp/ajax.php?$query_string;
    }

    location ~ ^/ajax.php/.*$ {
        try_files $uri $uri/ /ajax.php?$query_string;
    }

    location / {
        try_files $uri $uri/ index.php;
    }

    location ~ \.php$ {
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
        fastcgi_param  PATH_INFO        $path_info;
        fastcgi_pass   localhost:8888;
    }
}

0 个答案:

没有答案