-
Notifications
You must be signed in to change notification settings - Fork 0
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
76 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,76 @@ | ||
server { | ||
listen 80; | ||
index index.html; | ||
server_tokens off; | ||
client_max_body_size 10M; | ||
|
||
location /static/material/ { | ||
alias /static/material/; | ||
} | ||
location /static/admin/ { | ||
alias /static/admin/; | ||
} | ||
location /admin { | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://backend:8000/admin; | ||
} | ||
location /registration { | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
proxy_pass http://backend:8000/registration; | ||
} | ||
location / { | ||
alias /static/; | ||
autoindex on; | ||
proxy_set_header Host $host; | ||
} | ||
} | ||
|
||
server { | ||
|
||
listen 443 ssl http2; | ||
listen [::]:443 ssl http2; | ||
|
||
keepalive_timeout 45; | ||
reset_timedout_connection on; | ||
client_body_timeout 35; | ||
send_timeout 30; | ||
|
||
sendfile on; | ||
aio on; | ||
tcp_nopush on; | ||
|
||
open_file_cache max=100000 inactive=20s; | ||
open_file_cache_valid 45s; | ||
open_file_cache_min_uses 2; | ||
open_file_cache_errors on; | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
gzip_vary on; | ||
gzip_proxied any; | ||
gzip_comp_level 6; | ||
gzip_buffers 16 8k; | ||
gzip_http_version 1.1; | ||
gzip_min_length 1100; | ||
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; | ||
|
||
server_name ${HOST_NG}; | ||
|
||
include /config/nginx/ssl.conf; | ||
|
||
client_max_body_size 10M; | ||
|
||
location / { | ||
include /config/nginx/proxy.conf; | ||
set $upstream_app bot; | ||
set $upstream_port 8000; | ||
set $upstream_proto http; | ||
proxy_pass $upstream_proto://$upstream_app:$upstream_port; | ||
} | ||
|
||
} |