Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. # Load configuration files for the default server block.
  2. include /etc/nginx/default.d/*.conf;
  3.  
  4. location / {
  5. proxy_pass http://172.16.0.115/;
  6. proxy_set_header X-Forwarded-For
  7. $proxy_add_x_forwarded_for;
  8. proxy_set_header X-Real-IP $remote_addr;
  9. proxy_set_header Host $host;
  10. }
  11.  
  12.  
  13. error_page 404 /404.html;
  14. location = /40x.html {
  15. }
  16.  
  17. error_page 500 502 503 504 /50x.html;
  18. location = /50x.html {
  19. }
  20.  
  21. openssl req -x509 -new -newkey rsa:2048 -nodes -keyout private.key -out public.pem -days 750
  22.  
  23. openssl req -x509 -new -newkey rsa:2048 -nodes -keyout private.key -out public.pem -days 750
  24. openssl pkcs12 -inkey private.key -in public.pem -export -out certificate.p12
  25. openssl pkcs12 -in certificate.p12 -noout -info
  26.  
  27. ssl_certificate "/etc/ssl/public.pem";
  28. ssl_certificate_key "/etc/ssl/private.key";
  29. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  30. ssl_ciphers HIGH:!aNULL:!MD5;
  31. access_log /var/log/nginx/ssl-access.log combined;
  32.  
  33. # Load configuration files for the default server block.
  34. include /etc/nginx/default.d/*.conf;
  35.  
  36.  
  37. location / {
  38. proxy_pass https://172.16.0.115/;
  39. # Also tried proxy_pass https://172.16.0.115:443/;
  40.  
  41.  
  42. }
  43.  
  44.  
  45. error_page 404 /404.html;
  46. location = /40x.html {
  47. }
  48.  
  49. error_page 500 502 503 504 /50x.html;
  50. location = /50x.html {
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement