Advertisement
Mochinov

Untitled

Jun 29th, 2021
2,166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.52 KB | None | 0 0
  1. #     ssl_session_cache   shared:SSL:10m;
  2. #     ssl_session_timeout 5m;
  3. #     ssl_stapling on;
  4. #     resolver 8.8.8.8;
  5.  
  6.  
  7.  
  8. upstream django {
  9.      server unix:/tmp/aqmt.sock;
  10. }
  11.  
  12.  
  13. server {
  14.     listen 80;
  15.     server_name 85.143.174.248;
  16.  
  17.     keepalive_timeout   180;
  18.     client_max_body_size 150M;
  19.     gzip on;
  20.     gzip_min_length  1100;
  21.     gzip_buffers  4 32k;
  22.     gzip_comp_level 5;
  23.     gzip_types  text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  24.     gzip_vary on;
  25.  
  26.     location /private-x-accel-redirect/ {
  27.         internal;
  28.         alias /home/alexander/aqmt/apps/private-media/;
  29.     }
  30.  
  31.     location /favicon.ico {
  32.     alias /home/alexander/aqmt/apps/static/images/favicon.ico;
  33.     }
  34.  
  35.     location ^~ /static/ {
  36.         root /home/alexander/aqmt/apps/;
  37.         expires    24h;
  38.         # expires    0;
  39.     }
  40.  
  41.     location /private-media/ {
  42.         uwsgi_pass  django;
  43.         include     /home/alexander/aqmt/config/uwsgi_params;
  44.         uwsgi_read_timeout 600;
  45.  
  46.         add_header 'Access-Control-Allow-Origin' '*' always;
  47.         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
  48.         add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,X-Frame-Options' always;
  49.         add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,X-Frame-Options' always;
  50.     }
  51.  
  52.     location /images/ {
  53.         root /home/alexander/aqmt/apps/media/;
  54.     }
  55. location /uploads/ {
  56.         root /home/alexander/aqmt/apps/media/;
  57.     }
  58.  
  59.     location /files/ {
  60.         root /home/alexander/aqmt/apps/media/;
  61.     }
  62.  
  63.     location /_versions/ {
  64.         root /home/alexander/aqmt/apps/media/;
  65.     }
  66.  
  67.  
  68.     location /socket.io/ {
  69.         proxy_pass http://localhost:5000;
  70.         proxy_set_header Upgrade $http_upgrade;
  71.         proxy_set_header Connection "upgrade";
  72.         proxy_http_version 1.1;
  73.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  74.         proxy_set_header Host $host;
  75.     }
  76.  
  77.  
  78.     location /new_poll/ {
  79.         proxy_pass http://localhost:5000;
  80.         proxy_set_header Upgrade $http_upgrade;
  81.         proxy_set_header Connection "upgrade";
  82.         proxy_http_version 1.1;
  83.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  84.         proxy_set_header Host $host;
  85.     }
  86.  
  87.     location /new_test/ {
  88.         proxy_pass http://localhost:5000;
  89.         proxy_set_header Upgrade $http_upgrade;
  90.         proxy_set_header Connection "upgrade";
  91.         proxy_http_version 1.1;
  92.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  93.         proxy_set_header Host $host;
  94.     }
  95. location / {
  96.         uwsgi_pass  django;
  97.         include     /home/alexander/aqmt/config/uwsgi_params;
  98.         uwsgi_read_timeout 600;
  99.  
  100.         add_header 'Access-Control-Allow-Origin' '*' always;
  101.         add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
  102.         add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,X-Frame-Options' always;
  103.         add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,X-Frame-Options' always;
  104.     }
  105.  
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement