Advertisement
Guest User

Untitled

a guest
Nov 5th, 2014
669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name real.domain.net;
  4. access_log /var/log/nginx/domain.access.log;
  5. error_log /var/log/nginx/domain.error.log;
  6. client_max_body_size 100m;
  7.  
  8.  
  9. location / {
  10. proxy_pass http://internal.network.net:4080;
  11. proxy_redirect off;
  12. proxy_buffering off;
  13. proxy_set_header Host $host;
  14. proxy_set_header X-Real-IP $remote_addr;
  15. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  16. }
  17.  
  18.  
  19. }
  20.  
  21.  
  22. #server {
  23. # listen 80;
  24. # return 301 https://$host$request_uri;
  25. #}
  26.  
  27. server {
  28. listen 443;
  29.  
  30. server_name real.domain.net;
  31. ssl_certificate /etc/nginx/ssl/nginx.crt;
  32. ssl_certificate_key /etc/nginx/ssl/nginx.key;
  33.  
  34. ssl on;
  35. ssl_session_cache builtin:1000 shared:SSL:10m;
  36. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  37. ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
  38. ssl_prefer_server_ciphers on;
  39.  
  40.  
  41.  
  42. access_log /var/log/nginx/real.domain.net.access.log;
  43. error_log /var/log/nginx/real.domain.net.error.log;
  44.  
  45. client_max_body_size 100m;
  46.  
  47. location / {
  48.  
  49. proxy_set_header Host $host;
  50. proxy_set_header X-Real-IP $remote_addr;
  51. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  52. proxy_set_header X-Forwarded-Proto $scheme;
  53. proxy_set_header X-Forwarded_Proto https;
  54.  
  55. # Fix the �^�^�It appears that your reverse proxy set up is broken" error.
  56. proxy_pass http://internal.network.net:4080;
  57. proxy_read_timeout 90;
  58.  
  59. proxy_redirect http://internal.network.net:4080 https://real.domain.net;
  60. }
  61.  
  62.  
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement