【发布时间】:2014-06-30 05:58:04
【问题描述】:
我已经按照 Ajenti 设置了一个服务器块 -> http://support.ajenti.org/topic/349870-ajenti-behind-nginx/
location /ajenti {
rewrite (/ajenti)$ / break;
rewrite /ajenti/(.*) /$1 break;
proxy_pass http://127.0.0.1:8000;
proxy_redirect / /ajenti/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}
这让我登录,但在我登录后 Ajenti 重定向到“/ajenti:auth”而不是“/ajenti/ajenti:auth”。
例如:浏览器 -> HTTPS -> Nginx -> HTTP -> Ajenti
“ajenti:static”资源似乎也是一个问题。
见:http://support.ajenti.org/topic/88086-support-ajenti-behind-a-reverse-proxy/
Nginx 中推荐的处理方法是什么?
【问题讨论】:
标签: nginx ubuntu-12.04