diff --git a/templates/nginx.proxy.site b/templates/nginx.proxy.site new file mode 100644 index 00000000..3a41f31a --- /dev/null +++ b/templates/nginx.proxy.site @@ -0,0 +1,22 @@ +server { + set $forward_scheme <>; + set $server "<>"; + set $port <>; + + listen 80; + listen 443 ssl http2; + + server_name <>; + + include conf.d/include/letsencrypt-acme-challenge.conf; + include conf.d/include/ssl-ciphers.conf; + ssl_certificate /etc/letsencrypt/live/<>/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/<>/privkey.pem; + + access_log /var/log/nginx/proxy-<>.log proxy; + + location / { + include conf.d/include/force-ssl.conf; + include conf.d/include/proxy.conf; + } +} diff --git a/templates/nginx.site b/templates/nginx.site index 24e0e699..e5eb51a9 100755 --- a/templates/nginx.site +++ b/templates/nginx.site @@ -1,21 +1,22 @@ server { - listen 80 proxy_protocol; + listen 80; - server_name www.schroedercity.com; - set $base /var/www/SchroederCity; + server_name <>; + set $base <>; root $base/public_html; - access_log /var/log/nginx/www.schroedercity.com-access.log; - error_log /var/log/nginx/www.schroedercity.com-error.log warn; + access_log /var/log/nginx/<>-access.log; + error_log /var/log/nginx/<>-error.log warn; - index index.php; + index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { - fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; include conf.d/include/php_fastcgi.conf; } diff --git a/templates/nginx.ssl.site b/templates/nginx.ssl.site index cd28240f..d2595f3a 100755 --- a/templates/nginx.ssl.site +++ b/templates/nginx.ssl.site @@ -1,19 +1,19 @@ server { - listen 80 proxy_protocol; - listen 443 ssl http2 proxy_protocol; + listen 80; + listen 443 ssl http2; - server_name www.schroedercity.com; - set $base /var/www/SchroederCity; + server_name <>; + set $base <>; root $base/public_html; - access_log /var/log/nginx/www.schroedercity.com-access.log; - error_log /var/log/nginx/www.schroedercity.com-error.log warn; + access_log /var/log/nginx/<>-access.log; + error_log /var/log/nginx/<>-error.log warn; - ssl_certificate /etc/letsencrypt/live/www.schroedercity.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/www.schroedercity.com/privkey.pem; + ssl_certificate /etc/letsencrypt/live/<>/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/<>/privkey.pem; include conf.d/include/ssl-ciphers.conf; - index index.php; + index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php?$query_string; @@ -21,7 +21,8 @@ server { } location ~ \.php$ { - fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; include conf.d/include/php_fastcgi.conf; }