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
| server { listen 80;
root /usr/share/nginx/www/public; index index.php index.html index.htm;
server_name 127.0.0.1 x.x.x.x; include blocksip.conf; location / { try_files $uri $uri/ /index.html; }
error_page 404 /404.html;
location /project_1 { include uwsgi_params; # the uwsgi_params file you installed uwsgi_pass unix:/project_1/project_1.sock; uwsgi_param SCRIPT_NAME /project_1; uwsgi_param UWSGI_SCRIPT project_1.wsgi; uwsgi_modifier1 30; uwsgi_read_timeout 1800s; uwsgi_send_timeout 1800s; }
location /project_1/media/ { alias /usr/share/nginx/www/django_static/project_1/media/; }
location /project_1/static/ { alias /usr/share/nginx/www/django_static/project_1/; }
location /apk/ { alias /usr/share/nginx/www/django_static/project_1/apk/online/; } location /project_n { include uwsgi_params; # the uwsgi_params file you installed uwsgi_pass unix:/project_n/project_n.sock; uwsgi_param SCRIPT_NAME /project_n; uwsgi_param UWSGI_SCRIPT project_n.wsgi; uwsgi_modifier1 30; uwsgi_read_timeout 1800s; uwsgi_send_timeout 1800s; }
location /project_n/media/ { alias /usr/share/nginx/www/django_static/project_n/media/; }
location /project_n/static/ { alias /usr/share/nginx/www/django_static/project_n/; }
location /apk_project_n/ { alias /usr/share/nginx/www/django_static/project_n/apk/online/; } }
|