Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name xxxxxxx.gotdns.org;
  4. root /var/www/html;
  5. index index.php index.html index.htm;
  6. location /.well-known/acme-challenge {
  7. default_type "text/plain";
  8. root /var/www/certbot;
  9. }
  10.  
  11. # Forces all other requests to HTTPS
  12. location / {
  13. return 301 https://$host$request_uri;
  14. }
  15. }
  16.  
  17. server {
  18. listen 443 ssl http2;
  19. server_name xxxxxxx.gotdns.org;
  20. root /var/www/html;
  21. index index.php index.html index.htm;
  22. ssl on;
  23. ssl_certificate /etc/letsencrypt/live/xxxxxxx.gotdns.org/fullchain.pem;
  24. ssl_certificate_key /etc/letsencrypt/live/xxxxxxx.gotdns.org/privkey.pem;
  25. ssl_protocols TLSv1.2;
  26. ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
  27. ssl_prefer_server_ciphers on;
  28. keepalive_timeout 70;
  29. add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
  30.  
  31. location / {
  32. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  33. proxy_set_header X-Forwarded-Proto http;
  34. proxy_set_header Host $http_host;
  35. proxy_pass http://127.0.0.1:5080/;
  36. proxy_redirect off;
  37. break;
  38. }
  39.  
  40. location /orig/ {
  41. auth_basic "Restricted";
  42. auth_basic_user_file /etc/nginx/.htpasswdadm;
  43. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  44. proxy_set_header X-Forwarded-Proto http;
  45. proxy_set_header Host $http_host;
  46. proxy_pass http://localhost:5080/;
  47. proxy_redirect off;
  48. break;
  49. }
  50.  
  51. location /status/ {
  52. auth_basic "Restricted";
  53. auth_basic_user_file /etc/nginx/.htpasswdadm;
  54. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  55. proxy_set_header X-Forwarded-Proto http;
  56. proxy_set_header Host $http_host;
  57. proxy_pass http://localhost:8050/;
  58. proxy_redirect off;
  59. break;
  60. }
  61. location ~ \.php$ {
  62. include snippets/fastcgi-php.conf;
  63. fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  64. }
  65.  
  66. location /phpmyadmin {
  67. auth_basic "Restricted";
  68. auth_basic_user_file /etc/nginx/.htpasswdadm;
  69. }
  70.  
  71. location /mitm {
  72. auth_basic "Restricted";
  73. auth_basic_user_file /etc/nginx/.htpasswddev;
  74. rewrite /mitm(.*) /$1 break;
  75. proxy_http_version 1.1;
  76. proxy_set_header Upgrade $http_upgrade;
  77. proxy_set_header Connection "upgrade";
  78. proxy_set_header Host $host;
  79. proxy_set_header X-Real-IP $remote_addr;
  80. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  81. proxy_pass http://127.0.0.1:8000;
  82. }
  83.  
  84. location /ws {
  85. auth_basic "Restricted";
  86. auth_basic_user_file /etc/nginx/.htpasswddev;
  87. proxy_redirect off;
  88. proxy_set_header Host $http_host;
  89. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  90. proxy_set_header X-Real-IP $remote_addr;
  91.  
  92. proxy_pass http://127.0.0.1:8080;
  93. proxy_http_version 1.1;
  94. proxy_set_header Upgrade $http_upgrade;
  95. proxy_set_header Connection "Upgrade";
  96. }
  97. }
  98.  
  99. server {
  100. listen 127.0.0.1:80;
  101. server_name 127.0.0.1;
  102. location /nginx_status {
  103. stub_status on;
  104. allow 127.0.0.1;
  105. deny all;
  106. }
  107. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement