Advertisement
Dev4fuN

Untitled

Dec 24th, 2024
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. server {
  2.  
  3. # SSL configuration
  4. #
  5. # listen 443 ssl default_server;
  6. # listen [::]:443 ssl default_server;
  7. #
  8. # Note: You should disable gzip for SSL traffic.
  9. # See: https://bugs.debian.org/773332
  10. #
  11. # Read up on ssl_ciphers to ensure a secure configuration.
  12. # See: https://bugs.debian.org/765782
  13. #
  14. # Self signed certs generated by the ssl-cert package
  15. # Don't use them in a production server!
  16. #
  17. # include snippets/snakeoil.conf;
  18.  
  19. root /var/www/awakening;
  20.  
  21. # Add index.php to the list if you are using PHP
  22. index index.html index.htm index.nginx-debian.html;
  23.  
  24. server_name awakening.fun;
  25.  
  26. location / {
  27. # First attempt to serve request as file, then
  28. # as directory, then fall back to displaying a 404.
  29. try_files $uri $uri/ =404 $uri.html $uri.php$is_args$query_string;
  30.  
  31. #autoindex on; #To enable directory listing.
  32. }
  33.  
  34. # pass PHP scripts to FastCGI server
  35. #
  36. location ~ \.php$ {
  37. include snippets/fastcgi-php.conf;
  38. #
  39. # # With php-fpm (or other unix sockets):
  40. fastcgi_pass unix:/run/php/php8.2-fpm.sock;
  41. # # With php-cgi (or other tcp sockets):
  42. # fastcgi_pass 127.0.0.1:9000;
  43. }
  44.  
  45. # deny access to .htaccess files, if Apache's document root
  46. # concurs with nginx's one
  47. #
  48. #location ~ /\.ht {
  49. # deny all;
  50. #}
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. listen [::]:443 ssl ipv6only=on; # managed by Certbot
  64. listen 443 ssl; # managed by Certbot
  65. ssl_certificate /etc/letsencrypt/live/awakening.fun/fullchain.pem; # managed by Certbot
  66. ssl_certificate_key /etc/letsencrypt/live/awakening.fun/privkey.pem; # managed by Certbot
  67. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  68. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  69.  
  70.  
  71. }
  72.  
  73.  
  74. # Virtual Host configuration for example.com
  75. #
  76. # You can move that to a different file under sites-available/ and symlink that
  77. # to sites-enabled/ to enable it.
  78. #
  79. #server {
  80. # listen 80;
  81. # listen [::]:80;
  82. #
  83. # server_name example.com;
  84. #
  85. # root /var/www/example.com;
  86. # index index.html;
  87. #
  88. # location / {
  89. # try_files $uri $uri/ =404;
  90. # }
  91. #
  92.  
  93. server {
  94. if ($host = awakening.fun) {
  95. return 301 https://$host$request_uri;
  96. } # managed by Certbot
  97.  
  98.  
  99.  
  100.  
  101. listen 80 default_server;
  102. listen [::]:80 default_server;
  103.  
  104. server_name awakening.fun;
  105. return 404; # managed by Certbot
  106.  
  107.  
  108.  
  109.  
  110. }
  111.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement