server {
listen 80;
server_name blog.coderdi.top coderdi.top;
rewrite ^(.*)$ https://blog.coderdi.top permanent;
}
server {
listen 80;
server_name im.coderdi.top;
rewrite ^(.*)$ https://im.coderdi.top permanent;
}
server {
listen 443 ssl http2;
server_name blog.coderdi.top;
ssl_certificate cert/blog.coderdi.top.pem;
ssl_certificate_key cert/blog.coderdi.top.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
root /home/admin/blog/dist;
index index.html index.htm index.nginx-debian.html;
location / {
try_files $uri $uri/ /index.html;
}
}
server {
listen 443 ssl http2;
server_name im.coderdi.top;
ssl_certificate cert/im.coderdi.top.pem;
ssl_certificate_key cert/im.coderdi.top.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
root /home/admin/learn/dist;
index index.html index.htm index.nginx-debian.html;
location / {
try_files $uri $uri/ /index.html;
}
#location / {
#proxy_pass https://localhost:6789;
#proxy_set_header Host $host;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
#}
}
server {
listen 7878 ssl http2;
ssl_certificate cert/blog.coderdi.top.pem;
ssl_certificate_key cert/blog.coderdi.top.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
location / {
root /home/admin/static;
}
}