-
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
3 changed files
with
76 additions
and
79 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
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 |
---|---|---|
@@ -1,76 +1,80 @@ | ||
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; | ||
} | ||
} | ||
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; | ||
|
||
# server { | ||
open_file_cache max=100000 inactive=20s; | ||
open_file_cache_valid 45s; | ||
open_file_cache_min_uses 2; | ||
open_file_cache_errors on; | ||
|
||
# listen 443 ssl http2; | ||
# listen [::]:443 ssl http2; | ||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
# keepalive_timeout 45; | ||
# reset_timedout_connection on; | ||
# client_body_timeout 35; | ||
# send_timeout 30; | ||
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; | ||
|
||
# sendfile on; | ||
# aio on; | ||
# tcp_nopush on; | ||
server_name jetrai.ru; | ||
|
||
# open_file_cache max=100000 inactive=20s; | ||
# open_file_cache_valid 45s; | ||
# open_file_cache_min_uses 2; | ||
# open_file_cache_errors on; | ||
include /config/nginx/ssl.conf; | ||
|
||
# gzip on; | ||
# gzip_disable "msie6"; | ||
client_max_body_size 10M; | ||
|
||
# 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; | ||
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 /static/material/ { | ||
alias /static/material/; | ||
} | ||
location /static/admin/ { | ||
alias /static/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_name jetrai.ru; | ||
# location / { | ||
# include /config/nginx/proxy.conf; | ||
# set $upstream_app backend; | ||
# set $upstream_port 8000; | ||
# set $upstream_proto http; | ||
# proxy_pass $upstream_proto://$upstream_app:$upstream_port; | ||
# } | ||
} | ||
|
||
# include /config/nginx/ssl.conf; | ||
|
||
# client_max_body_size 10M; | ||
server { | ||
if ($host = jetrai.ru) { | ||
return 301 https://$host$request_uri; | ||
} | ||
|
||
# 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; | ||
# } | ||
listen 80; | ||
server_name jetrai.ru; | ||
return 301 https://$host$request_uri; | ||
|
||
# } | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.