我用的是nginx
配置:
server {
listen 443 ssl;
server_name blog.skii.fun;
ssl_certificate /usr/local/nginx/conf/cert/domain name.pem;
ssl_certificate_key /usr/local/nginx/conf/cert/domain name.key; #将domain name.key替换成您证书的密钥文件名。
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
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;
proxy_pass http://127.0.0.1:xxxx/; # xxxx这里是halo的端口号
}
}
https://blog.skii.fun/archives/nginx-https