博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nginx 配置实例
阅读量:5356 次
发布时间:2019-06-15

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

user  nginx;worker_processes  4;error_log  /var/log/nginx/error.log warn;pid        /var/run/nginx.pid;events {    worker_connections  1024;}http {    include       /etc/nginx/mime.types;    default_type  application/octet-stream;    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '                      '$status $body_bytes_sent "$http_referer" '                      '"$http_user_agent" "$http_x_forwarded_for"';    access_log  /var/log/nginx/access.log  main;    sendfile        on;    #tcp_nopush     on;    keepalive_timeout  65;    #gzip  on;     # aibici   web     upstream   aibici_8000_proxy       {          server 192.168.10.151:80 weight=1;           server 192.168.10.150:80 weight=1;
}
# aibici   web_S     upstream   aibici_4433_proxy       {          server 192.168.10.151:443 weight=1;           server 192.168.10.150:443 weight=1;     }
include /etc/nginx/conf.d/aibici.conf;  } cat  /etc/nginx/conf.d/aibici.confserver {    client_max_body_size 20M;    listen 80;    server_name erp5_test.aibici.com;    rewrite ^(.*)$ https://${server_name}$1 permanent; }server {          client_max_body_size 20M;          listen       443 ssl;          server_name  erp5_test.aibici.com;          ssl on;          ssl_certificate   /etc/nginx/cert/cert-1523601212944_*.aibici.com.crt;          ssl_certificate_key  /etc/nginx/cert/cert-1523601212944_*.aibici.com.key;          ssl_session_timeout 5m;          ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;          ssl_protocols TLSv1 TLSv1.1 TLSv1.2;          ssl_prefer_server_ciphers on;                    location / {               proxy_pass https://aibici_8000_proxy;               proxy_redirect off;                proxy_set_header Host $host:8000;               proxy_next_upstream http_502;               proxy_next_upstream_tries 3;          }       } server {          client_max_body_size 20M;          listen       8001 ssl;          server_name  erp5_test.aibici.com;          ssl on;          ssl_certificate   /etc/nginx/cert/cert-1523601212944_*.aibici.com.crt;          ssl_certificate_key  /etc/nginx/cert/cert-1523601212944_*.aibici.com.key;          ssl_session_timeout 5m;          ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;          ssl_protocols TLSv1 TLSv1.1 TLSv1.2;          ssl_prefer_server_ciphers on;                    location / {               proxy_pass https://aibici_8001_proxy;               proxy_redirect off;                proxy_set_header Host $host:8001;               proxy_next_upstream http_502;               proxy_next_upstream_tries 3;          }      }

转载于:https://www.cnblogs.com/shiji888/p/10998966.html

你可能感兴趣的文章
luoguP3414 SAC#1 - 组合数
查看>>
图片点击轮播(三)-----2017-04-05
查看>>
直播技术细节3
查看>>
《分布式服务架构:原理、设计于实战》总结
查看>>
java中new一个对象和对象=null有什么区别
查看>>
字母和数字键的键码值(keyCode)
查看>>
IE8调用window.open导出EXCEL文件题目
查看>>
Spring mvc初学
查看>>
VTKMY 3.3 VS 2010 Configuration 配置
查看>>
01_1_准备ibatis环境
查看>>
windows中修改catalina.sh上传到linux执行报错This file is needed to run this program解决
查看>>
JavaScript中的BOM和DOM
查看>>
360浏览器兼容模式 不能$.post (不是a 连接 onclick的问题!!)
查看>>
spring注入Properties
查看>>
jmeter(五)创建web测试计划
查看>>
python基本数据类型
查看>>
1305: [CQOI2009]dance跳舞 - BZOJ
查看>>
将html代码中的大写标签转换成小写标签
查看>>
jmeter多线程组间的参数传递
查看>>
零散笔记
查看>>