-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
limit_req_zone $binary_remote_addr zone=two:10m rate=10r/s; | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name nk-preview.konfer.ca; | ||
|
||
ssl_certificate /etc/ssl/nk-preview/cert.pem; | ||
ssl_certificate_key /etc/ssl/nk-preview/key.pem; | ||
|
||
root /home/spur/staging/frontend; | ||
index index.html | ||
|
||
gzip on; | ||
gzip_vary on; | ||
gzip_proxied expired no-cache no-store private auth; | ||
gzip_types text/plain text/css text/xml text/javascript application/javascript | ||
application/x-javascript application/xml; | ||
gzip_disable "MSIE [1-6]\."; | ||
|
||
|
||
# frontend | ||
location / { | ||
try_files $uri $uri/ /index.html; | ||
add_header X-Frame-Options "SAMEORIGIN"; | ||
add_header X-XSS-Protection "1; mode=block"; | ||
add_header X-Content-Type-Options "nosniff"; | ||
} | ||
|
||
|
||
# backend | ||
location /api/v1 { | ||
limit_req zone=two burst=20 nodelay; | ||
limit_req_status 444; | ||
proxy_pass http://127.0.0.1:6969; | ||
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_set_header X-App-Name nk-staging; | ||
} | ||
|
||
# deny access to hidden files | ||
location ~ /\. { | ||
deny all; | ||
} | ||
} |