commit ce2ae1dda54651e21e960c4a52ca1b4fe365525d Author: Stefan Wieczorek Date: Thu Oct 22 10:15:11 2020 +0200 . diff --git a/v1/CakePHP/CakePHP 4 b/v1/CakePHP/CakePHP 4 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/CakePHP/CakePHP 4 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/CodeIgniter/CodeIgniter 4 b/v1/CodeIgniter/CodeIgniter 4 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/CodeIgniter/CodeIgniter 4 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Drupal/Drupal 8 b/v1/Drupal/Drupal 8 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Drupal/Drupal 8 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Drupal/Drupal 9 b/v1/Drupal/Drupal 9 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Drupal/Drupal 9 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/FuelPHP/FuelPHP 1.8 b/v1/FuelPHP/FuelPHP 1.8 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/FuelPHP/FuelPHP 1.8 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Generic/Generic b/v1/Generic/Generic new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Generic/Generic @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Joomla/Joomla 3.9 b/v1/Joomla/Joomla 3.9 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Joomla/Joomla 3.9 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Laminas/Laminas b/v1/Laminas/Laminas new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Laminas/Laminas @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Laravel/Laravel 7 b/v1/Laravel/Laravel 7 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Laravel/Laravel 7 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Laravel/Laravel 8 b/v1/Laravel/Laravel 8 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Laravel/Laravel 8 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Magento/Magento 1 b/v1/Magento/Magento 1 new file mode 100755 index 0000000..4f414f5 --- /dev/null +++ b/v1/Magento/Magento 1 @@ -0,0 +1,56 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + #fastcgi_param MAGE_RUN_CODE "store_code"; + #fastcgi_param MAGE_RUN_TYPE "website"; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Magento/Magento 2 b/v1/Magento/Magento 2 new file mode 100755 index 0000000..ac74b0f --- /dev/null +++ b/v1/Magento/Magento 2 @@ -0,0 +1,77 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + location /static/ { + location ~ ^/static/version { + rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last; + } + location ~* \.(ico|jpg|jpeg|png|gif|svg|js|json|css|swf|eot|ttf|otf|woff|woff2|html)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + if (!-f $request_filename) { + rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last; + rewrite ^/static/(.*)$ /static.php?resource=$1 last; + } + } + } + + location ~/media/ { + add_header Access-Control-Allow-Origin "*"; + expires max; + try_files $uri $uri/ /get.php$is_args$args; + } + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + #fastcgi_param MAGE_RUN_CODE "store_code"; + #fastcgi_param MAGE_RUN_TYPE "website"; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Matomo/Matomo 3 b/v1/Matomo/Matomo 3 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Matomo/Matomo 3 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Mautic/Mautic 3 b/v1/Mautic/Mautic 3 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Mautic/Mautic 3 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Moodle/Moodle 3.9 b/v1/Moodle/Moodle 3.9 new file mode 100755 index 0000000..7e4c79b --- /dev/null +++ b/v1/Moodle/Moodle 3.9 @@ -0,0 +1,61 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + location /dataroot/ { + internal; + alias /home/cloudpanel/htdocs/moodledata; + } + + rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last; + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Neos/Neos 5 b/v1/Neos/Neos 5 new file mode 100755 index 0000000..a91cd7f --- /dev/null +++ b/v1/Neos/Neos 5 @@ -0,0 +1,57 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + fastcgi_param FLOW_CONTEXT Development; + #fastcgi_param FLOW_CONTEXT Production; + fastcgi_param FLOW_REWRITEURLS 1; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Nextcloud/Nextcloud 19 b/v1/Nextcloud/Nextcloud 19 new file mode 100755 index 0000000..88106fd --- /dev/null +++ b/v1/Nextcloud/Nextcloud 19 @@ -0,0 +1,94 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + location = /.well-known/carddav { + return 301 $scheme://$host:$server_port/remote.php/dav; + } + + location = /.well-known/caldav { + return 301 $scheme://$host:$server_port/remote.php/dav; + } + + location / { + rewrite ^ /index.php; + } + + location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ { + deny all; + } + + location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) { + deny all; + } + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) { + include fastcgi_params; + fastcgi_split_path_info ^(.+?\.php)(\/.*|)$; + set $path_info $fastcgi_path_info; + try_files $fastcgi_script_name =404; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $path_info; + fastcgi_param front_controller_active true; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) { + try_files $uri/ =404; + index index.php; + } + + location ~ \.(?:css|js|woff2?|svg|gif|map)$ { + try_files $uri /index.php$request_uri; + add_header Cache-Control "public, max-age=15778463"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header X-Download-Options noopen; + add_header X-Permitted-Cross-Domain-Policies none; + add_header Referrer-Policy no-referrer; + # Optional: Don't log access to assets + access_log off; + } + + location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { + try_files $uri /index.php$request_uri; + # Optional: Don't log access to other assets + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Nextcloud/Nextcloud 20 b/v1/Nextcloud/Nextcloud 20 new file mode 100755 index 0000000..88106fd --- /dev/null +++ b/v1/Nextcloud/Nextcloud 20 @@ -0,0 +1,94 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + location = /.well-known/carddav { + return 301 $scheme://$host:$server_port/remote.php/dav; + } + + location = /.well-known/caldav { + return 301 $scheme://$host:$server_port/remote.php/dav; + } + + location / { + rewrite ^ /index.php; + } + + location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ { + deny all; + } + + location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) { + deny all; + } + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) { + include fastcgi_params; + fastcgi_split_path_info ^(.+?\.php)(\/.*|)$; + set $path_info $fastcgi_path_info; + try_files $fastcgi_script_name =404; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $path_info; + fastcgi_param front_controller_active true; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) { + try_files $uri/ =404; + index index.php; + } + + location ~ \.(?:css|js|woff2?|svg|gif|map)$ { + try_files $uri /index.php$request_uri; + add_header Cache-Control "public, max-age=15778463"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header X-Download-Options noopen; + add_header X-Permitted-Cross-Domain-Policies none; + add_header Referrer-Policy no-referrer; + # Optional: Don't log access to assets + access_log off; + } + + location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { + try_files $uri /index.php$request_uri; + # Optional: Don't log access to other assets + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/OroCRM/OroCRM 4.1 b/v1/OroCRM/OroCRM 4.1 new file mode 100755 index 0000000..e5b758d --- /dev/null +++ b/v1/OroCRM/OroCRM 4.1 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + # location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + # add_header Access-Control-Allow-Origin "*"; + # expires max; + # access_log off; + # } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/OroCommerce/OroCommerce 4.1 b/v1/OroCommerce/OroCommerce 4.1 new file mode 100755 index 0000000..e5b758d --- /dev/null +++ b/v1/OroCommerce/OroCommerce 4.1 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + # location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + # add_header Access-Control-Allow-Origin "*"; + # expires max; + # access_log off; + # } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/PrestaShop/PrestaShop 1.7 b/v1/PrestaShop/PrestaShop 1.7 new file mode 100755 index 0000000..3ebf31d --- /dev/null +++ b/v1/PrestaShop/PrestaShop 1.7 @@ -0,0 +1,59 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + # Redirect http to https + #if ($scheme != "https") { + # rewrite ^ https://$host$uri permanent; + #} + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + location /admin-dev/ { + try_files $uri $uri/ /admin-dev/index.php?$args; + } + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Shopware/Shopware 6 b/v1/Shopware/Shopware 6 new file mode 100755 index 0000000..686dfdd --- /dev/null +++ b/v1/Shopware/Shopware 6 @@ -0,0 +1,58 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + location /recovery/install/ { + try_files $uri $uri/ /recovery/install/index.php?$args; + } + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Slim/Slim 4 b/v1/Slim/Slim 4 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Slim/Slim 4 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Strapi/Strapi 3 b/v1/Strapi/Strapi 3 new file mode 100755 index 0000000..7a780f1 --- /dev/null +++ b/v1/Strapi/Strapi 3 @@ -0,0 +1,52 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + index index.php index.html; + + location / { + proxy_pass http://127.0.0.1:1337/; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $http_host; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_pass_request_headers on; + proxy_max_temp_file_size 0; + proxy_connect_timeout 900; + proxy_send_timeout 900; + proxy_read_timeout 900; + proxy_buffer_size 128k; + proxy_buffers 4 256k; + proxy_busy_buffers_size 256k; + proxy_temp_file_write_size 256k; + } +} \ No newline at end of file diff --git a/v1/Symfony/Symfony 4 b/v1/Symfony/Symfony 4 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Symfony/Symfony 4 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Symfony/Symfony 5 b/v1/Symfony/Symfony 5 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Symfony/Symfony 5 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/TYPO3/TYPO3 v10 b/v1/TYPO3/TYPO3 v10 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/TYPO3/TYPO3 v10 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/WooCommerce/WooCommerce b/v1/WooCommerce/WooCommerce new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/WooCommerce/WooCommerce @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/WordPress/WordPress 5 b/v1/WordPress/WordPress 5 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/WordPress/WordPress 5 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/Yii/Yii 2 b/v1/Yii/Yii 2 new file mode 100755 index 0000000..6ae77ea --- /dev/null +++ b/v1/Yii/Yii 2 @@ -0,0 +1,54 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ \.php$ { + include fastcgi_params; + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + try_files $uri =404; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { + add_header Access-Control-Allow-Origin "*"; + expires max; + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file diff --git a/v1/ownCloud/ownCloud 10 b/v1/ownCloud/ownCloud 10 new file mode 100755 index 0000000..748bdeb --- /dev/null +++ b/v1/ownCloud/ownCloud 10 @@ -0,0 +1,102 @@ +server { + listen 80; + listen [::]:80; + listen 443 ssl http2; + listen [::]:443 ssl http2; + {{ssl_certificate_key}} + {{ssl_certificate}} + {{server_name}} + {{root}} + + {{nginx_access_log}} + {{nginx_error_log}} + + add_header Strict-Transport-Security "max-age=15552000; includeSubDomains"; + + if ($bad_bot = 1) { + return 403; + } + + if ($scheme != "https") { + rewrite ^ https://$host$uri permanent; + } + + location ~ /.well-known { + auth_basic off; + allow all; + } + + {{basic_auth}} + + location = /.well-known/carddav { + return 301 $scheme://$host/remote.php/dav; + } + + location = /.well-known/caldav { + return 301 $scheme://$host/remote.php/dav; + } + + error_page 403 /core/templates/403.php; + error_page 404 /core/templates/404.php; + + location / { + rewrite ^ /index.php$uri; + } + + location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { + return 404; + } + + location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) { + return 404; + } + + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + + location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) { + include fastcgi_params; + fastcgi_split_path_info ^(.+?\.php)(\/.*|)$; + set $path_info $fastcgi_path_info; + try_files $fastcgi_script_name =404; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $path_info; + fastcgi_param front_controller_active true; + fastcgi_read_timeout 3600; + fastcgi_send_timeout 3600; + fastcgi_param HTTPS $fastcgi_https; + {{php_fpm_listener}} + {{php_settings}} + } + + location ~ ^/(?:updater|ocs-provider)(?:$|/) { + try_files $uri $uri/ =404; + index index.php; + } + + location ~* \.(?:css|js)$ { + try_files $uri /index.php$uri$is_args$args; + add_header Cache-Control "public, max-age=7200"; + # Add headers to serve security related headers (It is intended to have those duplicated to the ones above) + # Before enabling Strict-Transport-Security headers please read into this topic first. + #add_header Strict-Transport-Security "max-age=15552000; includeSubDomains"; + add_header X-Content-Type-Options nosniff; + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header X-Download-Options noopen; + add_header X-Permitted-Cross-Domain-Policies none; + # Optional: Don't log access to assets + access_log off; + } + + location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ { + try_files $uri /index.php$uri$is_args$args; + # Optional: Don't log access to other assets + access_log off; + } + + if (-f $request_filename) { + break; + } +} \ No newline at end of file