server {
server_name coreui.redwoodjs.cn;
index index.html;
root /var/www/coreui4_demo/current/dist;
location / {
try_files $uri $uri/ /index.html;
access_log /var/www/coreui4_demo/shared/log/nginx.access.log;
error_log /var/www/coreui4_demo/shared/log/nginx.error.log;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/api.wefocusin.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/api.wefocusin.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = coreui.redwoodjs.cn) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name coreui.redwoodjs.cn;
return 404; # managed by Certbot
}
|