#server { # listen 80; # listen [::]:80; # server_name www.@SITENAME@ @SITENAME@; # return 301 https://$server_name$request_uri; #} server { listen 80; listen [::]:80; root /var/www/@SITENAME@; index index.php index.html index.htm; server_name www.@SITENAME@ @SITENAME@; access_log /var/log/nginx/@SITENAME@_access.log; error_log /var/log/nginx/@SITENAME@_error.log; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass 127.0.0.1:9000; } #./letsencrypt-auto certonly -a webroot --webroot-path=/etc/securesites -d @SITENAME@ -d www.@SITENAME@ location /.well-known { allow all; alias /etc/securesites/.well-known/; } } server { listen 443 ssl; listen [::]:443 ssl; ssl_certificate /etc/letsencrypt/live/@SITENAME@/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/@SITENAME@/privkey.pem; root /var/www/@SITENAME@; index index.php index.html index.htm; server_name www.@SITENAME@ @SITENAME@; access_log /var/log/nginx/@SITENAME@_access.log; error_log /var/log/nginx/@SITENAME@_error.log; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass 127.0.0.1:9000; } #./letsencrypt-auto certonly -a webroot --webroot-path=/etc/securesites -d @SITENAME@ -d www.@SITENAME@ location /.well-known { allow all; alias /etc/securesites/.well-known/; } }