File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
apps/py/ch12_deployment/config Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ server {
2
+ listen 80 ;
3
+ server_name guitary.talkpython.com;
4
+ server_tokens off ;
5
+ charset utf-8;
6
+ client_max_body_size 150M ;
7
+
8
+ ___location /static {
9
+ gzip on ;
10
+ gzip_buffers 8 256k ;
11
+ uwsgi_buffers 8 256k ;
12
+
13
+ alias /apps/app_repo/apps/py/ch07_web/guitary/static;
14
+ expires 365d ;
15
+ }
16
+ ___location / {
17
+ try_files $uri @yourapplication;
18
+ }
19
+ ___location @yourapplication {
20
+ include uwsgi_params;
21
+
22
+ gzip on ;
23
+ gzip_buffers 8 256k ;
24
+ uwsgi_buffers 8 256k ;
25
+ uwsgi_read_timeout 300 ;
26
+
27
+ proxy_pass http://127.0.0.1:5000;
28
+ proxy_set_header Host $host ;
29
+ proxy_set_header X-Real-IP $remote_addr ;
30
+ proxy_set_header X-Forwarded-Protocol $scheme ;
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments