mirror of https://github.com/zer0bin-dev/zer0bin
clean up nginx example, hopefully i didnt break it
This commit is contained in:
parent
afc1a1902b
commit
3152507ac2
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue