Created
November 26, 2013 03:38
-
-
Save Nataila/7653118 to your computer and use it in GitHub Desktop.
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
项目目录: | |
/var/www/knownsec | |
knownsec下会自动生成uwsgi.py(前提用apt-get安装nginx以及uwsgi) | |
nginx配置 | |
/etc/nginx/sites-enabled/ks | |
1 server { | |
2 | |
3 listen 80; | |
4 server_name www.knownsectech.com; | |
5 access_log /home/work/var/test/logs/access.log; | |
6 error_log /home/work/var/test/logs/error.log; | |
7 | |
8 #charset koi8-r; | |
9 | |
10 #access_log logs/host.access.log main; | |
11 | |
12 location / { | |
13 include uwsgi_params; | |
14 uwsgi_pass unix:///run/uwsgi/app/knownsec.com/socket; | |
15 } | |
16 | |
17 error_page 500 502 503 504 /50x.html; | |
18 location = /50x.html { | |
19 root html; | |
20 } | |
21 | |
22 location /static/ { | |
23 alias /var/www/knownsec/static/; | |
24 index index.html index.htm; | |
25 } | |
26 | |
27 location /media/ { | |
28 alias /var/www/knownsec/media/; | |
29 } | |
30 } | |
配置uwsgi | |
/etc/uwsgi/apps-enabled/knownsec.com.ini | |
1 [uwsgi] | |
2 plugins = python | |
3 pythonpath = /var/www/knownsec/ | |
4 chdir = /var/www/knownsec/ | |
5 module = wsgi | |
6 logto = /tmp/ks.log | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment