34 lines
743 B
Plaintext
34 lines
743 B
Plaintext
server {
|
|
listen 80;
|
|
server_name spa.homaroma.shop;
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name spa.homaroma.shop;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/spa.homaroma.shop/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/spa.homaroma.shop/privkey.pem;
|
|
|
|
root /usr/share/nginx/html/homaroma.shop/spa;
|
|
index index.html index.htm;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Caching for static assets
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires max;
|
|
log_not_found off;
|
|
}
|
|
}
|