【发布时间】:2014-02-28 18:28:45
【问题描述】:
我在 Glassfish 安装中运行了 Jenkins,因此可以联系到 Jenkins @
http://localhost:8090/jenkins/
我设法设置了 nginx,以便可以从外部访问 Jenkins @
http://build.example.com/jenkins/
到目前为止,此设置运行良好,但我对此并不满意。我真正想要达到的目标是击中
http://build.example.com
在浏览器中访问 Jenkins。
这是我当前的 nginx 配置:
server {
listen 80;
server_name build.example.com;
location / {
proxy_pass http://localhost:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
我希望这可以通过一些 url 重写来实现,但我完全不知道该怎么做......
【问题讨论】:
标签: nginx url-rewriting jenkins reverse-proxy