posts - 145,comments - 23,views - 73万
复制代码
user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    types_hash_max_size 2048;
    # server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    #ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
    
     server {
         server_name 192.168.62.132;
         listen 443;
     ssl on;
         ssl_certificate      /etc/nginx/ca/nginx.crt;   
         ssl_certificate_key  /etc/nginx/ca/key.pem;    
         ssl_client_certificate /etc/nginx/ca/ca.pem;
         ssl_crl /etc/nginx/ca/ManagementCA.crl;
         ssl_session_timeout 5m;  
  
         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;  
         ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;  
         ssl_prefer_server_ciphers on;   
         
     ssl_stapling on;
         ssl_stapling_responder http://192.168.62.132:8080/ejbca/publicweb/status/ocsp;
         ssl_stapling_verify on;
         ssl_trusted_certificate /etc/nginx/ca/full.pem;
         ssl_verify_depth 2;
         ssl_verify_client on;           
         location / {
            set $fixed_destination $http_destination;  
            if ( $http_destination ~* ^https(.*)$ )  
            {  
             set $fixed_destination http$1;  
            }         
            proxy_set_header        Host $host;  
            proxy_set_header        X-Real-IP $remote_addr;  
            proxy_set_header        Destination $fixed_destination;
            proxy_set_header        ssl_client_cert $ssl_client_cert;
            #proxy_set_header        ssl_client_fingerprint $ssl_client_fingerprint;
            #proxy_set_header        ssl_client_raw_cert    $ssl_client_raw_cert;
            proxy_set_header        ssl_client_serial      $ssl_client_serial;
            proxy_set_header        ssl_client_s_dn        $ssl_client_s_dn;
            proxy_set_header        ssl_client_i_dn        $ssl_client_i_dn;
            proxy_set_header        ssl_client_verify      $ssl_client_verify; 
  
            proxy_pass http://192.168.62.132:18080;
         }
        }
    
}


#mail {
#    # See sample authentication script at:
#    # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#    # auth_http localhost/auth.php;
#    # pop3_capabilities "TOP" "USER";
#    # imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#    server {
#        listen     localhost:110;
#        protocol   pop3;
#        proxy      on;
#    }
# 
#    server {
#        listen     localhost:143;
#        protocol   imap;
#        proxy      on;
#    }
#}
复制代码

 

posted on   梦中彩虹  阅读(1174)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示