23 lines
668 B
Plaintext
23 lines
668 B
Plaintext
server {
|
|
listen 80;
|
|
server_name api.homaroma.shop;
|
|
location ~ /.well-known/acme-challenge {
|
|
allow all;
|
|
root /var/www/certbot;
|
|
}
|
|
location / { return 301 https://$host$request_uri; }
|
|
}
|
|
server {
|
|
listen 443 ssl;
|
|
server_name api.homaroma.shop;
|
|
client_max_body_size 20m;
|
|
ssl_certificate /etc/letsencrypt/live/api.homaroma.shop/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/api.homaroma.shop/privkey.pem;
|
|
location / {
|
|
proxy_pass http://192.168.1.167:3051;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
}
|
|
}
|