Advertisement
tatdat171

api.conf

Jul 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. upstream api {
  2. server 10.6.1.43:8008;
  3. }
  4.  
  5. server {
  6. listen [::]:8008;
  7. listen 8008;
  8.  
  9. # disable cache
  10. # add_header Cache-Control "no-cache, must-revalidate, max-age=0";
  11.  
  12. client_body_timeout 300s;
  13. proxy_read_timeout 300s;
  14. proxy_send_timeout 300s;
  15. client_max_body_size 10m;
  16.  
  17. #include /etc/nginx/conf.d/expires.conf;
  18. #include /etc/nginx/conf.d/http-headers.conf;
  19. # change header values
  20. location / {
  21. proxy_pass http://api;
  22. proxy_pass_request_headers on;
  23. proxy_set_header Host $host;
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. proxy_set_header X-Forwarded-Proto $scheme;
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement