Guest User

Untitled

a guest
Dec 12th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. user www-data;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4. include /etc/nginx/modules-enabled/*.conf;
  5.  
  6. events {
  7. worker_connections 768;
  8. # multi_accept on;
  9. }
  10.  
  11. http {
  12.  
  13. ##
  14. # Basic Settings
  15. ##
  16.  
  17. sendfile on;
  18. tcp_nopush on;
  19. tcp_nodelay on;
  20. keepalive_timeout 65;
  21. types_hash_max_size 2048;
  22. # server_tokens off;
  23.  
  24. # server_names_hash_bucket_size 64;
  25. # server_name_in_redirect off;
  26.  
  27. include /etc/nginx/mime.types;
  28. default_type application/octet-stream;
  29.  
  30. ##
  31. # SSL Settings
  32. ##
  33.  
  34. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  35. ssl_prefer_server_ciphers on;
  36.  
  37. ##
  38. # Logging Settings
  39. ##
  40.  
  41. access_log /var/log/nginx/access.log;
  42. error_log /var/log/nginx/error.log;
  43.  
  44. ##
  45. # Gzip Settings
  46. ##
  47.  
  48. gzip on;
  49.  
  50. # gzip_vary on;
  51. # gzip_proxied any;
  52. # gzip_comp_level 6;
  53. # gzip_buffers 16 8k;
  54. # gzip_http_version 1.1;
  55. # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  56.  
  57. ##
  58. # Virtual Host Configs
  59. ##
  60.  
  61. include /etc/nginx/conf.d/*.conf;
  62. include /etc/nginx/sites-enabled/*;
  63. }
  64.  
  65.  
  66. #mail {
  67. # # See sample authentication script at:
  68. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  69. #
  70. # # auth_http localhost/auth.php;
  71. # # pop3_capabilities "TOP" "USER";
  72. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  73. #
  74. # server {
  75. # listen localhost:110;
  76. # protocol pop3;
  77. # proxy on;
  78. # }
  79. #
  80. # server {
  81. # listen localhost:143;
  82. # protocol imap;
  83. # proxy on;
  84. # }
  85. #}
  86.  
  87. proxy_set_header Host $http_host;
  88. proxy_set_header X-Real-IP $remote_addr;
  89. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  90. proxy_set_header X-Forwarded-Proto $scheme;
  91.  
  92. server {
  93. listen 80;
  94. listen [::]:80;
  95.  
  96. root /var/www/example.com.au/html;
  97. return 301 https://$host$request_uri;
  98. index index.html;
  99.  
  100. server_name example.com.au www.example.com.au;
  101.  
  102. access_log /var/log/nginx/example.com.access.log;
  103. error_log /var/log/nginx/example.com.error.log;
  104.  
  105. # location / {
  106. # try_files $uri $uri/ =404;
  107. # }
  108.  
  109. # listen [::]:443 ssl ipv6only=on; # managed by Certbot
  110. # listen 443 ssl; # managed by Certbot
  111. # ssl_certificate /etc/letsencrypt/live/example.com.au/fullchain.pem; # managed by Certbot
  112. # ssl_certificate_key /etc/letsencrypt/live/example.com.au/privkey.pem; # managed by Certbot
  113. # include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  114. # ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  115.  
  116. }
  117.  
  118. server {
  119. server_name example.com.au;
  120. listen 443 ssl;
  121. listen [::]:443 ssl;
  122. root /var/www/example.com.au/html;
  123. index index.html;
  124. ssl_certificate /etc/letsencrypt/live/example.com.au/fullchain.pem; # managed by Certbot
  125. ssl_certificate_key /etc/letsencrypt/live/example.com.au/privkey.pem;
  126. # managed by Certbot
  127. }
  128.  
  129. sudo ufw status
  130. Status: active
  131.  
  132. To Action From
  133. -- ------ ----
  134. Nginx Full ALLOW Anywhere
  135. 443 ALLOW Anywhere
  136. Nginx Full (v6) ALLOW Anywhere (v6)
  137. 443 (v6) ALLOW Anywhere (v6)
  138.  
  139. /etc/letsencrypt/live/example.com.au/cert.pem
  140. /etc/letsencrypt/live/example.com.au/chain.pem
  141. /etc/letsencrypt/live/example.com.au/fullchain.pem
  142. /etc/letsencrypt/live/example.com.au/privkey.pem
  143. /etc/letsencrypt/live/example.com.au/README
Add Comment
Please, Sign In to add comment