a_igin

Untitled

Oct 22nd, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. upstream backend {
  2. server unix:/srv/prostatic.sock;
  3. }
  4.  
  5. server {
  6. listen 80;
  7. server_name localhost;
  8. proxy_read_timeout 60;
  9.  
  10. client_max_body_size 20m;
  11.  
  12. location /static/ {
  13. access_log /root/log/nginx-static-access.log;
  14. error_log /root/log/nginx-static-error.log;
  15. alias /root/files/static/;
  16. }
  17.  
  18. location /media/ {
  19. access_log /root/log/nginx-media-access.log;
  20. error_log /root/log/nginx-media-error.log;
  21. alias /root/files/media/;
  22. }
  23.  
  24. location / {
  25. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  26. proxy_set_header Host $host;
  27. proxy_redirect off;
  28.  
  29. proxy_pass http://backend;
  30. }
  31. }
  32.  
Add Comment
Please, Sign In to add comment