Advertisement
Guest User

Untitled

a guest
Jul 10th, 2019
360
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None
  1. # Default server configuration
  2. #
  3. server {
  4. listen 80 default_server;
  5. listen [::]:80 default_server;
  6.  
  7. # SSL configuration
  8. #
  9. # listen 443 ssl default_server;
  10. # listen [::]:443 ssl default_server;
  11. #
  12. # Note: You should disable gzip for SSL traffic.
  13. # See: https://bugs.debian.org/773332
  14. #
  15. # Read up on ssl_ciphers to ensure a secure configuration.
  16. # See: https://bugs.debian.org/765782
  17. #
  18. # Self signed certs generated by the ssl-cert package
  19. # Don't use them in a production server!
  20. #
  21. # include snippets/snakeoil.conf;
  22.  
  23. root /var/www/html;
  24.  
  25. # Add index.php to the list if you are using PHP
  26. index index.html index.htm index.nginx-debian.html;
  27.  
  28. server_name _;
  29.  
  30. location / {
  31. # First attempt to serve request as file, then
  32. # as directory, then fall back to displaying a 404.
  33. try_files $uri $uri/ =404;
  34. }
  35.  
  36. # pass PHP scripts to FastCGI server
  37. #
  38. #location ~ \.php$ {
  39. # include snippets/fastcgi-php.conf;
  40. #
  41. # # With php-fpm (or other unix sockets):
  42. # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  43. # # With php-cgi (or other tcp sockets):
  44. # fastcgi_pass 127.0.0.1:9000;
  45. #}
  46.  
  47. # deny access to .htaccess files, if Apache's document root
  48. # concurs with nginx's one
  49. #
  50. #location ~ /\.ht {
  51. # deny all;
  52. #}
  53. }
  54.  
  55.  
  56. # Virtual Host configuration for example.com
  57. #
  58. # You can move that to a different file under sites-available/ and symlink that
  59. # to sites-enabled/ to enable it.
  60. #
  61. #server {
  62. # listen 80;
  63. # listen [::]:80;
  64. #
  65. # server_name example.com;
  66. #
  67. # root /var/www/example.com;
  68. # index index.html;
  69. #
  70. # location / {
  71. # try_files $uri $uri/ =404;
  72. # }
  73. #}
  74.  
  75. server {
  76.  
  77. # SSL configuration
  78. #
  79. # listen 443 ssl default_server;
  80. # listen [::]:443 ssl default_server;
  81. #
  82. # Note: You should disable gzip for SSL traffic.
  83. # See: https://bugs.debian.org/773332
  84. #
  85. # Read up on ssl_ciphers to ensure a secure configuration.
  86. # See: https://bugs.debian.org/765782
  87. #
  88. # Self signed certs generated by the ssl-cert package
  89. # Don't use them in a production server!
  90. #
  91. # include snippets/snakeoil.conf;
  92.  
  93. root /var/www/html;
  94.  
  95. # Add index.php to the list if you are using PHP
  96. index index.html index.htm index.nginx-debian.html;
  97. server_name freeaudioconverter.net onlineaudioconverter.net; # managed by Certbot
  98.  
  99.  
  100. location / {
  101. # First attempt to serve request as file, then
  102. # as directory, then fall back to displaying a 404.
  103. try_files $uri $uri/ =404;
  104. }
  105.  
  106. # pass PHP scripts to FastCGI server
  107. #
  108. #location ~ \.php$ {
  109. # include snippets/fastcgi-php.conf;
  110. #
  111. # # With php-fpm (or other unix sockets):
  112. # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
  113. # # With php-cgi (or other tcp sockets):
  114. # fastcgi_pass 127.0.0.1:9000;
  115. #}
  116.  
  117. # deny access to .htaccess files, if Apache's document root
  118. # concurs with nginx's one
  119. #
  120. #location ~ /\.ht {
  121. # deny all;
  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/freeaudioconverter.net/fullchain.pem; # managed by Certbot
  128. ssl_certificate_key /etc/letsencrypt/live/freeaudioconverter.net/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. server {
  136. if ($host = onlineaudioconverter.net) {
  137. return 301 https://$host$request_uri;
  138. } # managed by Certbot
  139.  
  140.  
  141. if ($host = freeaudioconverter.net) {
  142. return 301 https://$host$request_uri;
  143. } # managed by Certbot
  144.  
  145.  
  146. listen 80 ;
  147. listen [::]:80 ;
  148. server_name freeaudioconverter.net onlineaudioconverter.net;
  149. return 404; # managed by Certbot
  150.  
  151.  
  152.  
  153.  
  154. }
Advertisement
RAW Paste Data Copied
Advertisement