clean up nginx example, hopefully i didnt break it

This commit is contained in:
Dominic Harris 2022-03-04 09:31:29 -05:00
parent afc1a1902b
commit 3152507ac2
No known key found for this signature in database
GPG Key ID: 93CCF85F3E2A4F65
1 changed files with 13 additions and 7 deletions

View File

@ -8,17 +8,20 @@ server {
}
server {
add_header Access-Control-Allow-Origin *;
listen 80;
server_name example.tld www.example.tld;
root /location/to/zer0bin/frontend;
index index.html;
location ^~ /.well-known/ {
alias /var/www/.well-known/;
}
location /api/ {
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Origin' '*';
proxy_pass http://localhost:8000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
@ -26,23 +29,26 @@ server {
}
server {
add_header Access-Control-Allow-Origin *;
listen 443 ssl;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.tld www.example.tld;
root /location/to/zer0bin/frontend;
index index.html;
#ssl_certificate /etc/letsencrypt/live/example.tld/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/example.tld/privkey.pem;
location ^~ /.well-known/ {
alias /var/www/.well-known/;
}
location /api/ {
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Origin' '*';
proxy_pass http://localhost:8000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
}
#ssl_certificate /etc/letsencrypt/live/example.tld/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/example.tld/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
}