【发布时间】:2017-06-07 10:54:19
【问题描述】:
我目前正在尝试建立一个运行 Rundeck 和 nginx 反向 ssl 代理的环境。我在网上找到了针对这种情况的不同教程,但没有一个对我有用。我在运行 rundeck 和 nginx 的 linux 环境中工作。我的 rundeck 的 nginx 配置文件如下所示:
server {
access_log /var/log/nginx/rundeck.access.log main;
listen 443;
listen [::]:443;
ssl on;
ssl_certificate /etc/nginx/conf.d/cert.crt;
ssl_certificate_key /etc/nginx/conf.d/key.rsa;
location / {
proxy_pass http://localhost:4440/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Ssl on;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
此外,我在 rundeck 中配置了这些参数:
framework.server.url = https://localhost:4440 和 grails.serverURL=https://lde71d6p.de.top.com:443
我尝试了使用 https 或仅使用 http 的不同组合,没有端口和端口。它们都不能正常工作。
使用当前配置,我得到以下错误情况。 如果我尝试调用http://hostname.top.com -> 连接错误(似乎很好,因为 nginx 不处理端口 80) https://hostname.top.com -> 得到 302 并被重定向到 http://hostname.top.com/user/login;jsessionid=xxxxxxx,然后出现连接错误。 https://hostname.top.com/user/login 让我直接进入 rundeck 的登录界面。一切都好。
谁能帮我解决我首先提到的错误情况?
亲切的问候,
最大
【问题讨论】:
标签: ssl nginx reverse-proxy rundeck