Some checks failed
Deploy Nginx Config to Ubuntu Server / deploy (push) Has been cancelled
Made-with: Cursor
51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name goosefarminvesting.com www.goosefarminvesting.com;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/goosefarminvesting.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/goosefarminvesting.com/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
root /var/www/html/goosefarm;
|
|
index index.html;
|
|
|
|
location /api/ {
|
|
proxy_pass http://localhost:8200/api/;
|
|
proxy_set_header Host $host;
|
|
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_read_timeout 120s;
|
|
proxy_buffering on;
|
|
proxy_buffer_size 16k;
|
|
proxy_buffers 8 128k;
|
|
proxy_busy_buffers_size 256k;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location = /index.html {
|
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
|
}
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
alias /var/www/html/.well-known/acme-challenge/;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name goosefarminvesting.com www.goosefarminvesting.com;
|
|
location /.well-known/acme-challenge/ {
|
|
alias /var/www/html/.well-known/acme-challenge/;
|
|
}
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|