安装 Nginx

参考之前的一篇文章 Nginx 安装配置

安装 Jenkins

参考之前的一篇文章 Linux 搭建 Jenkins

Nginx 配置 Jenkins 的反向代理

# /etc/nginx/conf.d
upstream jenkins {
server 127.0.0.1:8080;
} server {
listen 80;
server_name jenkins-pro.michael.com;
charset utf-8;
client_body_buffer_size 10M;
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_next_upstream error timeout invalid_header http_502 http_503 http_504;
proxy_ignore_client_abort on;
proxy_read_timeout 180;
proxy_buffering on;
proxy_buffer_size 8k; proxy_buffers 8 8M; gzip on;
gzip_min_length 1000;
gzip_types text/plain text/css application/json text/xml application/xml application/xml+rss text/javascript; location / {
proxy_pass http://jenkins;
proxy_redirect default;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

执行 systemctl reload nginx 你就可以用域名访问 jenkins 了

参考

Nginx 配置 Jenkins 反向代理的更多相关文章

  1. Nginx配置实例-反向代理实例:根据访问的路径跳转到不同端口的服务中

    场景 Ubuntu Server 16.04 LTS上怎样安装下载安装Nginx并启动: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/detai ...

  2. Nginx配置实例-反向代理实现浏览器请求Nginx跳转到服务器某页面

    场景 Ubuntu Server 16.04 LTS上怎样安装下载安装Nginx并启动: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/detai ...

  3. nginx 配置实例-反向代理

    反向代理实例一 虚拟机IP:192.168.116.129实现效果:使用 nginx 反向代理,访问 www.123.com 直接跳转到 虚拟机的192.168.116.129:8080  实验代码  ...

  4. Nginx配置Tomcat8反向代理出现 java.lang.IllegalArgumentException: The character [_] is never valid in a domain name.

    在配置Nginx的反向代理,访问反向代理的路径而出现了异常 java.lang.IllegalArgumentException: The character [_] is never valid i ...

  5. Nginx配置实验反向代理

    l  实验要求 浏览器访问 8083.mine.com:8081 地址,(Nginx端口是8081)通过Nginx服务器反向代理监听请求,将请求转发到tomcat服务器上,实现真正内容的访问. l  ...

  6. centos7安装Nginx 配置及反向代理

    Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx,它的发音为“engine X”,是一个高性能的HTTP和反向代理服务器,同时也是一个IMAP/POP3/SMTP 代理服务器.Ngin ...

  7. Nginx 笔记(三)nginx 配置实例 - 反向代理、负载均衡、动静分离

    个人博客网:https://wushaopei.github.io/    (你想要这里多有) 一.反向代理 反向代理准备工作: (1)在 liunx 系统安装 tomcat,使用默认端口 8080 ...

  8. Nginx配置WebSocket反向代理(Tomcat+Nginx)

    @toc WebSocket 和HTTP协议不同,但是WebSocket中的握手和HTTP中的握手兼容,它使用HTTP中的Upgrade协议头将连接从HTTP升级到WebSocket.这使得WebSo ...

  9. nginx::配置https/反向代理

    vim /etc/nginx/nginx.conf user nginx; worker_processes ; error_log /var/log/nginx/error.log warn; pi ...

随机推荐

  1. Qt信号之自定义数据类型

    [1]为什么需要自定义数据类型? 内置类型毕竟很有局限性,否则为什么还需要类呢.总之,有时候,我们多么希望信号能发送自定义数据类型. 幸哉~ Qt是支持自定义信号,且自定义信号可以发送自定义数据类型的 ...

  2. spring 源码导入eclipse(sts)

    一. 准备工作 1.下载安装sts(springsource推荐使用) 下载地址: http://www.springsource.org/downloads/sts-ggts 2.下载安装gradl ...

  3. mysql 安装目录说明

  4. hive的find_in_set函数

    集合查找函数: find_in_set语法: find_in_set(string str, string strList) 返回值: int说明: 返回str在strlist第一次出现的位置,str ...

  5. vue-cli项目npm run build后,index.html无法在浏览器打开

  6. (Review cs231n) The Gradient Calculation of Neural Network

    前言:牵扯到较多的数学问题 原始的评分函数: 两层神经网络,经过一个激活函数: 如图所示,中间隐藏层的个数的各数为超参数: 和SVM,一个单独的线性分类器需要处理不同朝向的汽车,但是它并不能处理不同颜 ...

  7. windows下cmd清屏命令cls

    windows下cmd清屏命令cls

  8. go语言,golang学习笔记2 web框架选择

    go语言,golang学习笔记2 web框架选择 用什么go web框架比较好呢?能不能推荐个中文资料多的web框架呢? beego框架用的人最多,中文资料最多 首页 - beego: 简约 & ...

  9. centos 6.8 配置csh的shell和环境变量

    1.查看shell 查看系统中安装的所有版本的shell:cat   /etc/shells 查看当前用户使用的shell:echo $SHELL 2.修改用户shell 可以在/etc/passwd ...

  10. hihoCoder #1106 : Koch Snowflake 微软苏州校招笔试(1月17日)

    描述 Koch Snowflake is one of the most famous factal. It is built by starting with an equilateral tria ...