進入nginx 配置文件 cd /root/nginx/conf 找到nginx.conf
修改server塊內容:
server {
listen 80;
server_name XXX(ip:10.25.1.12或者域名);
#charset koi8-r;
#access_log logs/host.access.log main;
location /jenkins {
#root html;
#index index.html index.htm index.php;
proxy_pass XXXXXX(Jenkins的訪問地址http://10.25.1.12:8080/jenkins;
}
反向代理成功后,可以使用http://10.25.1.12/jenkins