server {
listen 80;
listen 443 ssl;
server_name [DOMAIN];
ssl on;
ssl_certificate /work/ssl/1.crt;
ssl_certificate_key /work/ssl/2.key;
location / {
proxy_pass http://127.0.0.1:2368;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
這一名配置中的ssl,我想是為了實現http與https同時訪問。
listen 443 ssl;