何亦冷

导航

nginx简易配置

worker_processes  1;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;
    access_log off;

    server {
        listen 80;
        server_name www.hepengju.com;
        rewrite ^(.*)$ https://${server_name}$1 permanent;
    }

    server {
        listen       443 ssl;
        server_name  www.hepengju.com;

        ssl_certificate      www.hepengju.com.crt;
        ssl_certificate_key  www.hepengju.com.key;

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;

        ssl_ciphers  HIGH:!aNULL:!MD5;
        ssl_prefer_server_ciphers  on;

        location / {
            proxy_pass   http://127.0.0.1:8080;
        }
    }
}

 

posted on 2022-06-16 10:25  何亦冷  阅读(40)  评论(0编辑  收藏  举报