Nginx 配置重写或内部重定向循环

Nginx 配置重写或内部重定向循环

我正在使用带有 ISPConfig 3 的 Nginx 进行配置,但我得到了重写或内部重定向循环,凭借我对 nginx 的有限了解,我无法弄清楚。

[error] 13741#0: *64 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"

虚拟主机配置:

server {
        listen 8080 ssl;
        ssl_certificate /usr/local/ispconfig/interface/ssl/ispserver.crt;
        ssl_certificate_key /usr/local/ispconfig/interface/ssl/ispserver.key;

        server_name _;

        root   /usr/local/ispconfig/interface/web/;

        client_max_body_size 20M;

        location / {
               index index.php index.html;
        }

        # serve static files directly
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
               access_log        off;
        }

        location ~ \.php$ {
               include /etc/nginx/fastcgi_params;
               fastcgi_pass unix:/var/lib/php5-fpm/ispconfig.sock;
               fastcgi_index index.php;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_script_name;
               fastcgi_buffer_size 128k;
               fastcgi_buffers 256 4k;
               fastcgi_busy_buffers_size 256k;
               fastcgi_temp_file_write_size 256k;
        }

        location ~ /\. {
               deny  all;
        }

#        location /phpmyadmin {
#               root /usr/share/;
#               index index.php index.html index.htm;
#               location ~ ^/phpmyadmin/(.+\.php)$ {
#                       try_files $uri =404;
#                       root /usr/share/;
#                       include /etc/nginx/fastcgi_params;
#                       fastcgi_pass unix:/var/lib/php5-fpm/ispconfig.sock;
#                       fastcgi_param  HTTPS on;
#                       fastcgi_index index.php;
#                       fastcgi_param SCRIPT_FILENAME $request_filename;
#               }
#               location ~* ^/phpmyadmin/(.+\.        (jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
#                       root /usr/share/;
#               }
#        }
#        location /phpMyAdmin {
#               rewrite ^/* /phpmyadmin last;
#        }
#
#        location /squirrelmail {
#               root /usr/share/;
#               index index.php index.html index.htm;
#               location ~ ^/squirrelmail/(.+\.php)$ {
#                       try_files $uri =404;
#                       root /usr/share/;
#                       include /etc/nginx/fastcgi_params;
#                       fastcgi_pass unix:/var/lib/php5-fpm/ispconfig.sock;
#                       fastcgi_param  HTTPS on;
#                       fastcgi_index index.php;
#                       fastcgi_param SCRIPT_FILENAME $request_filename;
#               }
#               location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
#                       root /usr/share/;
#               }
#        }
#        location /webmail {
#               rewrite ^/* /squirrelmail last;
#        }
}

相关内容