From f578d7d80cba9e5b3ebfce050d360bf561a0217f Mon Sep 17 00:00:00 2001 From: OSPanel <93676052+OSPanel@users.noreply.github.com> Date: Wed, 24 Apr 2024 18:20:56 +0300 Subject: [PATCH] Update httpd.comf --- .../ospanel_data/default/templates/httpd.conf | 110 ++++++++++++------ .../ospanel_data/default/templates/httpd.conf | 110 ++++++++++++------ .../ospanel_data/default/templates/httpd.conf | 110 ++++++++++++------ .../ospanel_data/default/templates/httpd.conf | 110 ++++++++++++------ .../ospanel_data/default/templates/httpd.conf | 110 ++++++++++++------ .../ospanel_data/default/templates/httpd.conf | 110 ++++++++++++------ .../ospanel_data/default/templates/httpd.conf | 110 ++++++++++++------ 7 files changed, 518 insertions(+), 252 deletions(-) diff --git a/modules/PHP-7.2/ospanel_data/default/templates/httpd.conf b/modules/PHP-7.2/ospanel_data/default/templates/httpd.conf index bf3835b15..285c591a5 100644 --- a/modules/PHP-7.2/ospanel_data/default/templates/httpd.conf +++ b/modules/PHP-7.2/ospanel_data/default/templates/httpd.conf @@ -193,7 +193,14 @@ LoadModule php7_module ../PHP/php7apache2_4.dll - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + RequestReadTimeout header=20-40,MinRate=500 body=20-40,MinRate=500 + + + + IPOtherLimit 16 + IPReadLimit 16 + IPWriteLimit 16 + LocalIPs 127.0.0.1 ::1 @@ -229,6 +236,33 @@ LoadModule php7_module ../PHP/php7apache2_4.dll MaxMindDBEnv COUNTRY_NAME COUNTRY_DB/country/names/en + + ExpiresActive on + ExpiresDefault "access plus 1 days" + ExpiresByType application/atom+xml "access plus 1 hours" + ExpiresByType application/rss+xml "access plus 1 hours" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType application/manifest+json "access plus 0 seconds" + + + + + BrotliCompressionQuality 5 + AddOutputFilterByType INCLUDES;BROTLI_COMPRESS text/html + AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + DeflateCompressionLevel 5 + AddOutputFilterByType INCLUDES;DEFLATE text/html + AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + # ----------------------------------------------------------------------------------- # Logs # ----------------------------------------------------------------------------------- @@ -394,7 +428,7 @@ AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW +LanguagePriority en ru ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR sv tr zh-CN zh-TW ForceLanguagePriority Prefer Fallback AddCharset us-ascii .ascii .us-ascii @@ -444,6 +478,8 @@ AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis +AddDefaultCharset utf-8 + # ----------------------------------------------------------------------------------- # SSL # ----------------------------------------------------------------------------------- @@ -529,6 +565,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -567,6 +610,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -579,18 +629,15 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases DocumentRoot "$public_dir" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -606,14 +653,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -624,6 +663,11 @@ AddCharset shift_jis .shift_jis .sjis ServerAlias $aliases DocumentRoot "$public_dir" ScriptAlias /cgi-bin/ "$cgi_dir/" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -640,14 +684,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases @@ -655,7 +691,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 @@ -673,14 +714,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -694,7 +727,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 diff --git a/modules/PHP-7.3/ospanel_data/default/templates/httpd.conf b/modules/PHP-7.3/ospanel_data/default/templates/httpd.conf index bf3835b15..285c591a5 100644 --- a/modules/PHP-7.3/ospanel_data/default/templates/httpd.conf +++ b/modules/PHP-7.3/ospanel_data/default/templates/httpd.conf @@ -193,7 +193,14 @@ LoadModule php7_module ../PHP/php7apache2_4.dll - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + RequestReadTimeout header=20-40,MinRate=500 body=20-40,MinRate=500 + + + + IPOtherLimit 16 + IPReadLimit 16 + IPWriteLimit 16 + LocalIPs 127.0.0.1 ::1 @@ -229,6 +236,33 @@ LoadModule php7_module ../PHP/php7apache2_4.dll MaxMindDBEnv COUNTRY_NAME COUNTRY_DB/country/names/en + + ExpiresActive on + ExpiresDefault "access plus 1 days" + ExpiresByType application/atom+xml "access plus 1 hours" + ExpiresByType application/rss+xml "access plus 1 hours" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType application/manifest+json "access plus 0 seconds" + + + + + BrotliCompressionQuality 5 + AddOutputFilterByType INCLUDES;BROTLI_COMPRESS text/html + AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + DeflateCompressionLevel 5 + AddOutputFilterByType INCLUDES;DEFLATE text/html + AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + # ----------------------------------------------------------------------------------- # Logs # ----------------------------------------------------------------------------------- @@ -394,7 +428,7 @@ AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW +LanguagePriority en ru ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR sv tr zh-CN zh-TW ForceLanguagePriority Prefer Fallback AddCharset us-ascii .ascii .us-ascii @@ -444,6 +478,8 @@ AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis +AddDefaultCharset utf-8 + # ----------------------------------------------------------------------------------- # SSL # ----------------------------------------------------------------------------------- @@ -529,6 +565,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -567,6 +610,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -579,18 +629,15 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases DocumentRoot "$public_dir" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -606,14 +653,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -624,6 +663,11 @@ AddCharset shift_jis .shift_jis .sjis ServerAlias $aliases DocumentRoot "$public_dir" ScriptAlias /cgi-bin/ "$cgi_dir/" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -640,14 +684,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases @@ -655,7 +691,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 @@ -673,14 +714,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -694,7 +727,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 diff --git a/modules/PHP-7.4/ospanel_data/default/templates/httpd.conf b/modules/PHP-7.4/ospanel_data/default/templates/httpd.conf index bf3835b15..285c591a5 100644 --- a/modules/PHP-7.4/ospanel_data/default/templates/httpd.conf +++ b/modules/PHP-7.4/ospanel_data/default/templates/httpd.conf @@ -193,7 +193,14 @@ LoadModule php7_module ../PHP/php7apache2_4.dll - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + RequestReadTimeout header=20-40,MinRate=500 body=20-40,MinRate=500 + + + + IPOtherLimit 16 + IPReadLimit 16 + IPWriteLimit 16 + LocalIPs 127.0.0.1 ::1 @@ -229,6 +236,33 @@ LoadModule php7_module ../PHP/php7apache2_4.dll MaxMindDBEnv COUNTRY_NAME COUNTRY_DB/country/names/en + + ExpiresActive on + ExpiresDefault "access plus 1 days" + ExpiresByType application/atom+xml "access plus 1 hours" + ExpiresByType application/rss+xml "access plus 1 hours" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType application/manifest+json "access plus 0 seconds" + + + + + BrotliCompressionQuality 5 + AddOutputFilterByType INCLUDES;BROTLI_COMPRESS text/html + AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + DeflateCompressionLevel 5 + AddOutputFilterByType INCLUDES;DEFLATE text/html + AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + # ----------------------------------------------------------------------------------- # Logs # ----------------------------------------------------------------------------------- @@ -394,7 +428,7 @@ AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW +LanguagePriority en ru ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR sv tr zh-CN zh-TW ForceLanguagePriority Prefer Fallback AddCharset us-ascii .ascii .us-ascii @@ -444,6 +478,8 @@ AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis +AddDefaultCharset utf-8 + # ----------------------------------------------------------------------------------- # SSL # ----------------------------------------------------------------------------------- @@ -529,6 +565,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -567,6 +610,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -579,18 +629,15 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases DocumentRoot "$public_dir" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -606,14 +653,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -624,6 +663,11 @@ AddCharset shift_jis .shift_jis .sjis ServerAlias $aliases DocumentRoot "$public_dir" ScriptAlias /cgi-bin/ "$cgi_dir/" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -640,14 +684,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases @@ -655,7 +691,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 @@ -673,14 +714,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -694,7 +727,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 diff --git a/modules/PHP-8.0/ospanel_data/default/templates/httpd.conf b/modules/PHP-8.0/ospanel_data/default/templates/httpd.conf index c1502059a..fe1aa2bc3 100644 --- a/modules/PHP-8.0/ospanel_data/default/templates/httpd.conf +++ b/modules/PHP-8.0/ospanel_data/default/templates/httpd.conf @@ -193,7 +193,14 @@ LoadModule php_module ../PHP/php8apache2_4.dll - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + RequestReadTimeout header=20-40,MinRate=500 body=20-40,MinRate=500 + + + + IPOtherLimit 16 + IPReadLimit 16 + IPWriteLimit 16 + LocalIPs 127.0.0.1 ::1 @@ -229,6 +236,33 @@ LoadModule php_module ../PHP/php8apache2_4.dll MaxMindDBEnv COUNTRY_NAME COUNTRY_DB/country/names/en + + ExpiresActive on + ExpiresDefault "access plus 1 days" + ExpiresByType application/atom+xml "access plus 1 hours" + ExpiresByType application/rss+xml "access plus 1 hours" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType application/manifest+json "access plus 0 seconds" + + + + + BrotliCompressionQuality 5 + AddOutputFilterByType INCLUDES;BROTLI_COMPRESS text/html + AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + DeflateCompressionLevel 5 + AddOutputFilterByType INCLUDES;DEFLATE text/html + AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + # ----------------------------------------------------------------------------------- # Logs # ----------------------------------------------------------------------------------- @@ -394,7 +428,7 @@ AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW +LanguagePriority en ru ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR sv tr zh-CN zh-TW ForceLanguagePriority Prefer Fallback AddCharset us-ascii .ascii .us-ascii @@ -444,6 +478,8 @@ AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis +AddDefaultCharset utf-8 + # ----------------------------------------------------------------------------------- # SSL # ----------------------------------------------------------------------------------- @@ -529,6 +565,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -567,6 +610,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -579,18 +629,15 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases DocumentRoot "$public_dir" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -606,14 +653,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -624,6 +663,11 @@ AddCharset shift_jis .shift_jis .sjis ServerAlias $aliases DocumentRoot "$public_dir" ScriptAlias /cgi-bin/ "$cgi_dir/" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -640,14 +684,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases @@ -655,7 +691,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 @@ -673,14 +714,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -694,7 +727,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 diff --git a/modules/PHP-8.1/ospanel_data/default/templates/httpd.conf b/modules/PHP-8.1/ospanel_data/default/templates/httpd.conf index c1502059a..fe1aa2bc3 100644 --- a/modules/PHP-8.1/ospanel_data/default/templates/httpd.conf +++ b/modules/PHP-8.1/ospanel_data/default/templates/httpd.conf @@ -193,7 +193,14 @@ LoadModule php_module ../PHP/php8apache2_4.dll - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + RequestReadTimeout header=20-40,MinRate=500 body=20-40,MinRate=500 + + + + IPOtherLimit 16 + IPReadLimit 16 + IPWriteLimit 16 + LocalIPs 127.0.0.1 ::1 @@ -229,6 +236,33 @@ LoadModule php_module ../PHP/php8apache2_4.dll MaxMindDBEnv COUNTRY_NAME COUNTRY_DB/country/names/en + + ExpiresActive on + ExpiresDefault "access plus 1 days" + ExpiresByType application/atom+xml "access plus 1 hours" + ExpiresByType application/rss+xml "access plus 1 hours" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType application/manifest+json "access plus 0 seconds" + + + + + BrotliCompressionQuality 5 + AddOutputFilterByType INCLUDES;BROTLI_COMPRESS text/html + AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + DeflateCompressionLevel 5 + AddOutputFilterByType INCLUDES;DEFLATE text/html + AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + # ----------------------------------------------------------------------------------- # Logs # ----------------------------------------------------------------------------------- @@ -394,7 +428,7 @@ AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW +LanguagePriority en ru ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR sv tr zh-CN zh-TW ForceLanguagePriority Prefer Fallback AddCharset us-ascii .ascii .us-ascii @@ -444,6 +478,8 @@ AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis +AddDefaultCharset utf-8 + # ----------------------------------------------------------------------------------- # SSL # ----------------------------------------------------------------------------------- @@ -529,6 +565,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -567,6 +610,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -579,18 +629,15 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases DocumentRoot "$public_dir" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -606,14 +653,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -624,6 +663,11 @@ AddCharset shift_jis .shift_jis .sjis ServerAlias $aliases DocumentRoot "$public_dir" ScriptAlias /cgi-bin/ "$cgi_dir/" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -640,14 +684,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases @@ -655,7 +691,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 @@ -673,14 +714,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -694,7 +727,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 diff --git a/modules/PHP-8.2/ospanel_data/default/templates/httpd.conf b/modules/PHP-8.2/ospanel_data/default/templates/httpd.conf index c1502059a..fe1aa2bc3 100644 --- a/modules/PHP-8.2/ospanel_data/default/templates/httpd.conf +++ b/modules/PHP-8.2/ospanel_data/default/templates/httpd.conf @@ -193,7 +193,14 @@ LoadModule php_module ../PHP/php8apache2_4.dll - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + RequestReadTimeout header=20-40,MinRate=500 body=20-40,MinRate=500 + + + + IPOtherLimit 16 + IPReadLimit 16 + IPWriteLimit 16 + LocalIPs 127.0.0.1 ::1 @@ -229,6 +236,33 @@ LoadModule php_module ../PHP/php8apache2_4.dll MaxMindDBEnv COUNTRY_NAME COUNTRY_DB/country/names/en + + ExpiresActive on + ExpiresDefault "access plus 1 days" + ExpiresByType application/atom+xml "access plus 1 hours" + ExpiresByType application/rss+xml "access plus 1 hours" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType application/manifest+json "access plus 0 seconds" + + + + + BrotliCompressionQuality 5 + AddOutputFilterByType INCLUDES;BROTLI_COMPRESS text/html + AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + DeflateCompressionLevel 5 + AddOutputFilterByType INCLUDES;DEFLATE text/html + AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + # ----------------------------------------------------------------------------------- # Logs # ----------------------------------------------------------------------------------- @@ -394,7 +428,7 @@ AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW +LanguagePriority en ru ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR sv tr zh-CN zh-TW ForceLanguagePriority Prefer Fallback AddCharset us-ascii .ascii .us-ascii @@ -444,6 +478,8 @@ AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis +AddDefaultCharset utf-8 + # ----------------------------------------------------------------------------------- # SSL # ----------------------------------------------------------------------------------- @@ -529,6 +565,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -567,6 +610,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -579,18 +629,15 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases DocumentRoot "$public_dir" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -606,14 +653,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -624,6 +663,11 @@ AddCharset shift_jis .shift_jis .sjis ServerAlias $aliases DocumentRoot "$public_dir" ScriptAlias /cgi-bin/ "$cgi_dir/" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -640,14 +684,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases @@ -655,7 +691,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 @@ -673,14 +714,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -694,7 +727,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 diff --git a/modules/PHP-8.3/ospanel_data/default/templates/httpd.conf b/modules/PHP-8.3/ospanel_data/default/templates/httpd.conf index c1502059a..fe1aa2bc3 100644 --- a/modules/PHP-8.3/ospanel_data/default/templates/httpd.conf +++ b/modules/PHP-8.3/ospanel_data/default/templates/httpd.conf @@ -193,7 +193,14 @@ LoadModule php_module ../PHP/php8apache2_4.dll - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + RequestReadTimeout header=20-40,MinRate=500 body=20-40,MinRate=500 + + + + IPOtherLimit 16 + IPReadLimit 16 + IPWriteLimit 16 + LocalIPs 127.0.0.1 ::1 @@ -229,6 +236,33 @@ LoadModule php_module ../PHP/php8apache2_4.dll MaxMindDBEnv COUNTRY_NAME COUNTRY_DB/country/names/en + + ExpiresActive on + ExpiresDefault "access plus 1 days" + ExpiresByType application/atom+xml "access plus 1 hours" + ExpiresByType application/rss+xml "access plus 1 hours" + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + ExpiresByType text/html "access plus 0 seconds" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + ExpiresByType application/manifest+json "access plus 0 seconds" + + + + + BrotliCompressionQuality 5 + AddOutputFilterByType INCLUDES;BROTLI_COMPRESS text/html + AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + DeflateCompressionLevel 5 + AddOutputFilterByType INCLUDES;DEFLATE text/html + AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component + + + # ----------------------------------------------------------------------------------- # Logs # ----------------------------------------------------------------------------------- @@ -394,7 +428,7 @@ AddLanguage tr .tr AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW +LanguagePriority en ru ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR sv tr zh-CN zh-TW ForceLanguagePriority Prefer Fallback AddCharset us-ascii .ascii .us-ascii @@ -444,6 +478,8 @@ AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 AddCharset shift_jis .shift_jis .sjis +AddDefaultCharset utf-8 + # ----------------------------------------------------------------------------------- # SSL # ----------------------------------------------------------------------------------- @@ -529,6 +565,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -567,6 +610,13 @@ AddCharset shift_jis .shift_jis .sjis Require local + + + SetHandler watch-table + #Require all granted + Require local + + CustomLog "{root_dir}/logs/{module_name}/default_apache_access.log" combined ErrorLog "{root_dir}/logs/{module_name}/default_apache_error.log" @@ -579,18 +629,15 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases DocumentRoot "$public_dir" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -606,14 +653,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -624,6 +663,11 @@ AddCharset shift_jis .shift_jis .sjis ServerAlias $aliases DocumentRoot "$public_dir" ScriptAlias /cgi-bin/ "$cgi_dir/" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2c http/1.1 @@ -640,14 +684,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - ServerName $host ServerAlias $aliases @@ -655,7 +691,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1 @@ -673,14 +714,6 @@ AddCharset shift_jis .shift_jis .sjis AllowOverride All Options +Indexes +IncludesNoExec +Includes +ExecCGI Require all granted - - - AddOutputFilterByType BROTLI_COMPRESS application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - - AddOutputFilterByType DEFLATE application/atom+xml application/json text/json text/html text/xml text/javascript application/ld+json application/rss+xml application/geo+json application/xml application/rdf+xml application/javascript application/wasm application/rtf application/pdf application/xhtml+xml application/xslt+xml application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject font/woff font/woff2 font/ttf font/collection font/otf image/vnd.microsoft.icon image/x-icon image/svg+xml text/css text/csv text/plain text/markdown text/calendar text/vcard text/vtt text/cache-manifest text/vnd.rim.location.xloc text/x-component - - AllowOverride None @@ -694,7 +727,12 @@ AddCharset shift_jis .shift_jis .sjis SSLEngine on SSLCertificateFile "$ssl_cert_file" SSLCertificateKeyFile "$ssl_key_file" - #Header always set Strict-Transport-Security "max-age=94608000" + Header always set Access-Control-Allow-Origin "*" + Header always set Referrer-Policy "strict-origin-when-cross-origin" + # Header always set Strict-Transport-Security "max-age=94608000" + Header always set Timing-Allow-Origin "*" + Header always set X-Content-Type-Options "nosniff" + Header always set X-Frame-Options "SAMEORIGIN" Protocols h2 http/1.1