为什么http://compassionpit.com/blog/经历无限重定向循环?这是我的 nginx conf 文件。该站点由端口 8000 上的 nodejs 服务器运行,Apache 提供博客 (wordpress) 和论坛 (phpBB)。论坛解决得很好,在http://www.compassionpit.com/forum/ ...
server {
listen 80;
server_name www.compassionpit.org;
rewrite ^/(.*) http://www.compassionpit.com/$1 permanent;
}
server {
listen 80; # your server's public IP address
server_name www.compassionpit.com;
index index.php index.html;
location ~ ^/$ {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location @blogphp {
internal;
root /opt/blog/;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:8080;
}
location ~ ^/(forum|blog)/($|.*\.php) {
root /opt/; …Run Code Online (Sandbox Code Playgroud)