蒲公英v5p%n搭建局域网后用nginx做代理的配置
1.nginx.conf
worker_processes auto;
error_log /usr/local/var/log/nginx/error.log;
events {
worker_connections ;
}
http {
include mime.types;
default_type application/octet-stream;
#default_type text/html; client_max_body_size 2G;
server_names_hash_bucket_size ;
sendfile on;
keepalive_timeout ;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'"$gzip_ratio" $request_time $bytes_sent $request_length';
underscores_in_headers on;
include /usr/local/etc/nginx/conf.d/*.conf;
}
2.代理的vhost的配置
1.1 代理zabbix
server {
listen ;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
index index.html index.htm;
proxy_pass http://10.253.124.21:8111;
proxy_connect_timeout 3000s;
proxy_send_timeout 3000s;
proxy_read_timeout 3000s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
client_max_body_size 100m;
}
}
1.2 代理jenkins--(url带后缀)
server {
listen ;
server_name 172.19.134.43;
#charset koi8-r;
#access_log logs/host.access.log main;
location /jenkins {
index index.html index.htm;
proxy_pass http://10.253.124.22:8888/jenkins;
proxy_connect_timeout 3000s;
proxy_send_timeout 3000s;
proxy_read_timeout 3000s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
client_max_body_size 100m;
}
}
蒲公英v5p%n搭建局域网后用nginx做代理的配置的更多相关文章
- 【netcore基础】CentOS 7.6.1810 搭建.net core 2.1 linux 运行环境 nginx反向代理 supervisor配置自启动
之前写过一篇Ubuntu的环境搭建博客,感觉一些配置大同小异,这里重点记录下 nginx 作为静态 angular 项目文件服务器的配置 参考链接 [netcore基础]ubuntu 16.04 搭建 ...
- Django 关闭Debug后使用Nginx做静态文件的访问
Django 关闭Debug后使用Nginx做静态文件的访问 关闭Django 的Debug参数 1 . 修改settings.py配置文件 DEBUG = False 2 . settings.py ...
- nginx反向代理的配置优化
作者:守住每一天 blog:liuyu.blog.51cto.combbs:bbs.linuxtone.orgmsn:liuyubj520#hotmail.comemail:liuyu105#gmai ...
- Nginx反向代理的配置
Chapter: Nginx基本操作释疑 1. Nginx的端口修改问题 2. Nginx 301重定向的配置 3. Windows下配置Nginx使之支持PHP 4. Linux下配置Nginx使之 ...
- 服务器使用nginx做代理,通过HttpServletRequest获取请求用户真实IP地址
首先,在nginx配置中添加如下配置 server { listen ; server_name www.wenki.info; #要访问的域名 charset utf8; location / { ...
- nginx做代理安装docker
1.环境 服务器IP 服务用途 是否能 联网 192.168.126.128 docker服务器(简称B服务器) 不能 192.168.126.130 nginx服务器(简称A服务器) 能 2.背景 ...
- Centos7 nginx 反向代理的配置
一.正向代理与反向代理 1.正向代理 正向代理往VPN理解 正向代理,也就是传说中的代理,他的工作原理就像一个跳板(VPN),简单的说: 我是一个用户,我访问不了某网站,但是我能访问一个代理服务器,这 ...
- 搭建gerrit服务器(apache&nginx反向代理方式)
这段时间,想搭建一个gerrit,用于代码托管,gerrit的搭建,网上有很多种教程,但是自己按照别人的教程逐步操作,一直出现诸多问题.最头痛的就是:Configuration Error Check ...
- Tomcat多个项目部署,通过Nginx反向代理分别配置二级域名的流程
购买域名.示例:example.com 设置多个二级域名.如图: 配置tomcat文件: 修改tomcat/conf目录下的server.xml文件: 如下配置配置了3个容器,使用三个不同的端口. 请 ...
随机推荐
- vue、Element 点击按钮以弹窗形式预览pdf文件
直接上代码吧 <div > <el-button type="success" size="small" @click="isVie ...
- PHP基础教程-APACHE
兄弟连:如何配置APACHE.首先,安装并配置PHP3 1.解开压缩包到你喜欢的目录如:C:PHP3 2.把C:php3php3.ini-inst文件改名成PHP3.INI并拷贝到C:windows ...
- python 访问列表中的值
#!/usr/bin/python list1 = ['physics', 'chemistry', 1997, 2000] list2 = [1, 2, 3, 4, 5, 6, 7 ] print ...
- python中reversed()函数的用法
reversed(a) # 返回一个反转的迭代器 举例 a = [1, 2, 3, 4, 5] b = reversed(a) # b是一个迭代器 # print(list(b)) = [5, 4, ...
- Python3:Collatz 序列(考拉咨猜想)
编写一个名为collatz()的函数,它有一个名为number的参数: 如果参数是偶数,那么collatz()就打印出number//2,并返回该值: 如果number是奇数,那么collatz()就 ...
- Kamil and Making a Stream
E. Kamil and Making a Stream 参考:Codeforces Round #588 (Div. 2)-E. Kamil and Making a Stream-求树上同一直径上 ...
- js上传图片获取原始宽高
以vue上传图片为例: <template> <div> <input type="file" @change="uploadFile($e ...
- django CBV模式源码执行过程
在说CBV模式之前,先看下FBV的url配置方式: urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^xxx/', login), ur ...
- Swagger : API JSON 文件 转 PDF 问题总结
1. swagger API 转 PDF 具体请参考:woshihoujinxin/swagger-gendoc 2. 问题总结 接口方法值返回值为 void 类型时, @ApiOperation ...
- PL/SQL中文乱码问题
本人的使用情况是: 笨既没有安装Oracle,配置了PLSQL,在查询含有中文数据的时候遇到了查询的数据中有中文乱码的问题,中文显示为???,并且软件的某些提示也会出现. 先进行查询确认编码: ...