template.nginx.conf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #server {
  2. # listen 80;
  3. # listen [::]:80;
  4. # server_name www.@SITENAME@ @SITENAME@;
  5. # return 301 https://$server_name$request_uri;
  6. #}
  7. server {
  8. listen 80;
  9. listen [::]:80;
  10. root /var/www/@SITENAME@;
  11. index index.php index.html index.htm;
  12. server_name www.@SITENAME@ @SITENAME@;
  13. access_log /var/log/nginx/@SITENAME@_access.log;
  14. error_log /var/log/nginx/@SITENAME@_error.log;
  15. location / {
  16. try_files $uri $uri/ =404;
  17. }
  18. location ~ \.php$ {
  19. include snippets/fastcgi-php.conf;
  20. fastcgi_pass 127.0.0.1:9000;
  21. }
  22. #./letsencrypt-auto certonly -a webroot --webroot-path=/etc/securesites -d @SITENAME@ -d www.@SITENAME@
  23. location /.well-known {
  24. allow all;
  25. alias /etc/securesites/.well-known/;
  26. }
  27. }
  28. server {
  29. listen 443 ssl;
  30. listen [::]:443 ssl;
  31. ssl_certificate /etc/letsencrypt/live/@SITENAME@/fullchain.pem;
  32. ssl_certificate_key /etc/letsencrypt/live/@SITENAME@/privkey.pem;
  33. root /var/www/@SITENAME@;
  34. index index.php index.html index.htm;
  35. server_name www.@SITENAME@ @SITENAME@;
  36. access_log /var/log/nginx/@SITENAME@_access.log;
  37. error_log /var/log/nginx/@SITENAME@_error.log;
  38. location / {
  39. try_files $uri $uri/ =404;
  40. }
  41. location ~ \.php$ {
  42. include snippets/fastcgi-php.conf;
  43. fastcgi_pass 127.0.0.1:9000;
  44. }
  45. #./letsencrypt-auto certonly -a webroot --webroot-path=/etc/securesites -d @SITENAME@ -d www.@SITENAME@
  46. location /.well-known {
  47. allow all;
  48. alias /etc/securesites/.well-known/;
  49. }
  50. }