Advertisement
Guest User

Untitled

a guest
Feb 17th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. http {
  6. include mime.types;
  7. default_type application/octet-stream;
  8.  
  9. server {
  10. listen 80;
  11. server_name localhost:8080;
  12. return 301 https://$host$request_uri;
  13. }
  14.  
  15. server {
  16. listen 443 ssl;
  17. server_name localhost:8080;
  18.  
  19. ssl_certificate C:/nginx/conf/carpagetazeglove.pem;
  20. ssl_certificate_key C:/nginx/conf/carpagetazeglove.key;
  21.  
  22. #Turns on OCSP stapling
  23. #ssl_stapling on;
  24. #ssl_stapling_verify on;
  25.  
  26. # Uncomment this line only after testing in browsers,
  27. # as it commits you to continuing to serve your site over HTTPS
  28. # in future
  29. #add_header Strict-Transport-Security "max-age=31536000";
  30.  
  31. #access_log syslog:server=logserverip:514,facility=local7,tag=nginx_access,severity=info combined;
  32. #error_log syslog:server=logserverip:514,facility=local7,tag=nginx_error,severity=error;
  33.  
  34. location / {
  35. proxy_set_header X-Real-IP $remote_addr;
  36. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  37. proxy_set_header X-Forwarded-Proto https;
  38. proxy_set_header X-Forwarded-Host $http_host;
  39. proxy_set_header Host $http_host;
  40. proxy_max_temp_file_size 0;
  41. proxy_pass http://127.0.0.1:8080;
  42. proxy_redirect http:// https://;
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement