x
This commit is contained in:
1 parent
7b857b4eda
commit
fc6bf0218e
2 files changed
+25
-4
No files matched your search
@@ -1,21 +1,40 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name homaroma.shop www.homaroma.shop;
|
||||
location ~ /.well-known/acme-challenge {
|
||||
allow all;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
location / { return 301 https://$host$request_uri; }
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name homaroma.shop www.homaroma.shop;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/homaroma.shop/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/homaroma.shop/privkey.pem;
|
||||
|
||||
# Next.js SSR
|
||||
location / {
|
||||
proxy_pass http://192.168.1.167:3002;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
# Next.js static assets caching
|
||||
location /_next/static/ {
|
||||
proxy_pass http://192.168.1.167:3002;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user