forked from demitri/DMFlaskTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_sorghum_webapp.cfg
71 lines (58 loc) · 1.77 KB
/
nginx_sorghum_webapp.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
# myapplication web app server
#
server {
listen 80;
server_name myhost.com;
# Create separate logs for this server.
error_log /var/www/myapplication_webapp/nginx_error.log error;
access_log /var/www/myapplication_webapp/nginx_access.log;
# Location directive ref: http://wiki.nginx.org/NginxHttpCoreModule#location
# This is the most general description, which will be matched
# if a more specific regular expression is matched.
location / {
index index.html index.htm;
autoindex on;
uwsgi_pass unix:///tmp/uwsgi_myapplication_webapp.sock;
include uwsgi_params;
#auth_basic "Restricted";
#auth_basic_user_file /var/www/myapplication_webapp/htpasswd;
}
location ~* nginx\-logo\.png$ { alias /usr/share/nginx/html/nginx-logo.png; }
location ~* poweredby\.png$ { alias /usr/share/nginx/html/poweredby.png; }
location /static/ {
autoindex on;
root /var/www/myapplication_webapp/prefect;
}
# don't log favicon requests
location = /favicon.ico {
log_not_found off;
access_log off;
}
# don't log robot.txt requests
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
#location ~* \.(html|png|js|css)$ {
# root /var/www/myapplication_webapp/docs;
#}
# location = /favicon.ico { alias /var/www/favicon.ico; }
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}