Advertisement
Guest User

Untitled

a guest
Jan 14th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. # For more information on configuration, see:
  2. # * Official English Documentation: http://nginx.org/en/docs/
  3. # * Official Russian Documentation: http://nginx.org/ru/docs/
  4.  
  5. user nginx;
  6. worker_processes auto;
  7. error_log /var/log/nginx/error.log;
  8. pid /run/nginx.pid;
  9.  
  10. # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
  11. include /usr/share/nginx/modules/*.conf;
  12.  
  13. events {
  14. worker_connections 1024;
  15. }
  16.  
  17. http {
  18. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  19. '$status $body_bytes_sent "$http_referer" '
  20. '"$http_user_agent" "$http_x_forwarded_for"';
  21.  
  22. access_log /var/log/nginx/access.log main;
  23.  
  24. sendfile on;
  25. tcp_nopush on;
  26. tcp_nodelay on;
  27. keepalive_timeout 65;
  28. types_hash_max_size 2048;
  29.  
  30. include /etc/nginx/mime.types;
  31. default_type application/octet-stream;
  32.  
  33. # Load modular configuration files from the /etc/nginx/conf.d directory.
  34. # See http://nginx.org/en/docs/ngx_core_module.html#include
  35. # for more information.
  36. include /etc/nginx/conf.d/*.conf;
  37.  
  38. server {
  39. listen 80 default_server;
  40. listen [::]:80 default_server;
  41. server_name _;
  42.  
  43. #root /usr/share/nginx/html;
  44.  
  45. # Load configuration files for the default server block.
  46. include /etc/nginx/default.d/*.conf;
  47.  
  48. location / {
  49. }
  50.  
  51. location /admin {
  52. proxy_set_header X-Real-IP $remote_addr;
  53. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  54. proxy_set_header X-NginX-Proxy true;
  55. proxy_pass http://localhost:1337;
  56. proxy_ssl_session_reuse off;
  57. proxy_set_header Host $http_host;
  58. proxy_cache_bypass $http_upgrade;
  59. proxy_redirect off;
  60. }
  61.  
  62. error_page 404 /404.html;
  63. location = /40x.html {
  64. }
  65.  
  66. error_page 500 502 503 504 /50x.html;
  67. location = /50x.html {
  68. }
  69. }
  70.  
  71. # Settings for a TLS enabled server.
  72. #
  73. # server {
  74. # listen 443 ssl http2 default_server;
  75. # listen [::]:443 ssl http2 default_server;
  76. # server_name _;
  77. # root /usr/share/nginx/html;
  78. #
  79. # ssl_certificate "/etc/pki/nginx/server.crt";
  80. # ssl_certificate_key "/etc/pki/nginx/private/server.key";
  81. # ssl_session_cache shared:SSL:1m;
  82. # ssl_session_timeout 10m;
  83. # ssl_ciphers HIGH:!aNULL:!MD5;
  84. # ssl_prefer_server_ciphers on;
  85. #
  86. # # Load configuration files for the default server block.
  87. # include /etc/nginx/default.d/*.conf;
  88. #
  89. # location / {
  90. # }
  91. #
  92. # error_page 404 /404.html;
  93. # location = /40x.html {
  94. # }
  95. #
  96. # error_page 500 502 503 504 /50x.html;
  97. # location = /50x.html {
  98. # }
  99. # }
  100.  
  101.  
  102.  
  103. server {
  104. server_name thewentech.com; # managed by Certbot
  105. root /usr/share/nginx/html;
  106. index /index.html;
  107.  
  108. #/usr/share/nginx/html;
  109.  
  110. # Load configuration files for the default server block.
  111. include /etc/nginx/default.d/*.conf;
  112.  
  113. location / {
  114. }
  115.  
  116. error_page 404 /404.html;
  117. location = /40x.html {
  118. }
  119.  
  120. error_page 500 502 503 504 /50x.html;
  121. location = /50x.html {
  122. }
  123.  
  124.  
  125. listen [::]:443 ssl ipv6only=on; # managed by Certbot
  126. listen 443 ssl; # managed by Certbot
  127. ssl_certificate /etc/letsencrypt/live/thewentech.com/fullchain.pem; # managed by Certbot
  128. ssl_certificate_key /etc/letsencrypt/live/thewentech.com/privkey.pem; # managed by Certbot
  129. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  130. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  131.  
  132.  
  133.  
  134. }
  135.  
  136. server {
  137.  
  138. if ($host = thewentech.com) {
  139. return 301 https://$host$request_uri;
  140. } # managed by Certbot
  141.  
  142.  
  143. listen 80 ;
  144. listen [::]:80 ;
  145. server_name thewentech.com;
  146. return 404; # managed by Certbot
  147.  
  148.  
  149.  
  150.  
  151. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement