/etc/nginx/conf.d/halo.conf
upstream halo {
server 127.0.0.1:8090;
}
server {
listen 80;
server_name blog.firo1603.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name blog.firo1603.com;
client_max_body_size 1024m;
ssl_certificate /etc/nginx/conf.d/1_blog.firo1603.com_bundle.crt;
ssl_certificate_key /etc/nginx/conf.d/2_blog.firo1603.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RAS-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://halo;
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
只放配置文件,具体部署请自行查阅资料