1, 总配置文件

user nobody nobody;
worker_processes ;
worker_rlimit_nofile ; error_log /etc/nginx-idfa/logs/error.log crit;
pid /run/nginx.pid; events {
use epoll;
multi_accept on;
worker_connections ;
} http {
include /etc/nginx/mime.types;
client_max_body_size 1m;
sendfile on;
tcp_nopush on;
access_log off;
keepalive_timeout ; proxy_ignore_client_abort on; limit_req_zone $binary_remote_addr zone=allips:200m rate=90r/m; upstream idfa_server {
server 10.110.157.48:;
server 10.110.157.48:; keepalive ;
} include conf.d/*.conf;
}

2, 包含其他文件

[root@--- conf.d]# cat idfa.conf
server {
listen backlog=;
server_name 10.110.157.48;
add_header Cache-Control "no-cache,max-age=0";
if_modified_since off;
access_log off; userid on;
userid_name uid;
userid_path /; location ^~ /idfa/ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://idfa_server; }
}

3, 启动方式

nginx -c /etc/nginx-idfa/nginx.conf

4. 另一个配置样例

upstream nacos_server {
server 127.0.0.1:;
}
server {
listen ssl http2 default_server;
#listen [::]: ssl http2 default_server;
ssl_certificate /home/wenbronk/nginx/conf.crt/live/v2.wenbronk.cn/fullchain.pem; #生成的密钥对 #你的ssl证书, 如果第一次,可能还需要自签一下
ssl_certificate_key /home/wenbronk/nginx/conf.crt/live/v2.wenbronk.cn/privkey.pem; #生成的密钥对, 你的ssl key server_name nacos.wenbronk.cn; ssl_protocols TLSv1 TLSv1. TLSv1.; #使用的协议
#issl_prefer_server_ciphers on;
#ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"; #使用的加密算法
ssl_ciphers HIGH:!aNULL:!MD5; root /home/wenbronk/tengine/tengine/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html; location /bronk {
proxy_redirect off;
proxy_pass http://nacos_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
}
}

nginx-配置文件样例的更多相关文章

  1. nginx配置样例

    简单的nginx配置如下,包含了静态文件配置.websocket.socket.io的配置: user nobody; worker_processes 3; #master_process off; ...

  2. springMVC核心配置文件样例

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  3. 关于peersim样例配置文件的超详细解读(新手勿喷)

    相信很多兄弟一开始接触peersim,对配置文件还是有点不适应,我看了好久的样例的配置文件,一层层去找对应的文件的方法,终于好像悟懂了一点,记下来以后回顾. 贴上代码,一点点分析. 首先要说下所谓的配 ...

  4. Nginx完整配置配置样例【官方版】

    我们主要参考nginx官方给出的完整配置的样例: https://www.nginx.com/resources/wiki/start/topics/examples/full/# 完整摘录如下: n ...

  5. nginx https 配置样例

    站点nginx https 配置模板 第一章 nginx 支持https 配置样例 其他 相关链接地址 第一章 nginx 支持https 配置样例 说明:https 段配置参数说明 Server 段 ...

  6. Solr 6.7学习笔记(02)-- 配置文件 managed-schema (schema.xml) -- 样例(6)

    managed-schema 样例: <?xml version="1.0" encoding="UTF-8" ?> <!-- License ...

  7. 4.Nginx配置文件Nginx.conf_虚拟主机配置规则

    1.Nginx配置文件及各个配置项含义 #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_processes 8; #全 ...

  8. Nginx配置文件nginx.conf中文详解(转)

    ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...

  9. Nginx配置文件详解

    Nginx是一款面向性能设计的HTTP服务器,相较于Apache.lighttpd具有占有内存少,稳定性高等优势. ######Nginx配置文件nginx.conf中文详解##### #定义Ngin ...

随机推荐

  1. spring boot 2.2.0开始freemarker模板默认扩展名改为ftlh了

    2.2.0这个版本刚发布的时候更新到了这个版本,然后使用freemarker 的webapp运行报错. 查了spring boot的changelog,搜freemarker查到了这条.ftlh,使f ...

  2. vuex——action,mutation,getters的调用

    一.子模块调用根模块的方法 mutation调用  context.commit('clearloginInfo',{key_root:data},{root:true}); action调用  co ...

  3. Flink概述| 配置

    流处理技术的演变 在开源世界里,Apache Storm项目是流处理的先锋.Storm提供了低延迟的流处理,但是它为实时性付出了一些代价:很难实现高吞吐,并且其正确性没能达到通常所需的水平,换句话说, ...

  4. 基于V7的新版RL-USB和RL-FlashFS的NAND完整解决方案,实现更简单,用户仅需初始化FMC

    说明: 1.新版方案更加好用,不管用户使用的那家NAND,用户要做的仅仅是初始化FMC,其它读写API,擦写均衡,坏块管理,ECC校验和掉电保护都不用操心了. 2.新版RL-USB相比老版本功能强劲了 ...

  5. 使用opencv和numpy实现矩阵相乘和按元素相乘 matrix multiplication vs element-wise multiplication

    本文首发于个人博客https://kezunlin.me/post/1e37a6/,欢迎阅读最新内容! opencv and numpy matrix multiplication vs elemen ...

  6. 通过SSH隧道的本地转发实现Django连接远程数据库

    SSH连接命令 默认连接的端口为22 1. 使用私钥 ssh -p connect_port user_name@host -i your_private_identity 2. 使用用户密码 ssh ...

  7. PAT 1007 Maximum Subsequence Sum 最大连续子序列和

    Given a sequence of K integers { N1, N2, …, NK }. A continuous subsequence is defined to be { Ni, Ni ...

  8. python 使用tesseract进行图片识别

    from PIL import Image import pytesseract text = pytesseract.image_to_string(Image.open(r'E:\guo\2432 ...

  9. 验证码无法正常显示,提示Could not initialize class sun.awt.X11GraphicsEnvironment

    在Web开发中使用验证码时可能遇到的问题:java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsE ...

  10. iOS开发中,获取图片之后保存或下载到本地相册中

    #pragma mark 先获取本地图片或者网络图片 - (void)saveHeaderImageWith:(NSString *)path { UIImage *img = [UIImage im ...