博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
蒲公英v5p%n搭建局域网后用nginx做代理的配置
阅读量:5334 次
发布时间:2019-06-15

本文共 2202 字,大约阅读时间需要 7 分钟。

1.nginx.conf

worker_processes  auto;error_log  /usr/local/var/log/nginx/error.log;events {    worker_connections  1024;}http {    include       mime.types;    default_type  application/octet-stream;    #default_type text/html;    client_max_body_size 2G;    server_names_hash_bucket_size 256;    sendfile        on;    keepalive_timeout  65;    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 代理zabbixserver {        listen       60001;        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       8888;       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;       }}

 

转载于:https://www.cnblogs.com/hixiaowei/p/10950590.html

你可能感兴趣的文章
[计算机网络] vsftpd的安装与使用
查看>>
【源代码】LinkedList源代码分析
查看>>
Cocostudio学习笔记(4) LoadingBar+ TextField
查看>>
cxf和jboss eap 6.2版本号冲突
查看>>
ORACLE触发器具体解释
查看>>
IOS开发之SVN的使用
查看>>
Python学习之元组
查看>>
第三次作业
查看>>
quartz多任务调度+spring 实现
查看>>
Codeforces 97.B Superset
查看>>
noip2008 笨小猴
查看>>
洛谷P1459 三值的排序 Sorting a Three-Valued Sequence
查看>>
学习layer和laydate的官方文档
查看>>
JAVA 之 GC 二
查看>>
less
查看>>
深度学习激活函数们
查看>>
极其平凡的一天——3.19
查看>>
12306购票
查看>>
[笔记] 走进 Pocket,看看只有 20 位员工的 Pocket 是如何搞定 2000 万用户的
查看>>
HMTL—表单
查看>>