Add $host variable for fastcgi_params et proxy_params (#666)
* Fix install script version check * Add $host variable for fastcgi_params et proxy_params * Add "$http3" variable to logs * Bump release to v3.21.2 * Another fix for wildcard certificates
This commit is contained in:
@@ -149,6 +149,19 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
||||
encoding='utf-8', mode='a') as wo_nginx:
|
||||
wo_nginx.write('fastcgi_param \tSCRIPT_FILENAME '
|
||||
'\t$request_filename;\n')
|
||||
if not WOFileUtils.grep(self, '/etc/nginx/fastcgi_params',
|
||||
'HTTP_HOST'):
|
||||
WOFileUtils.textappend(self, '/etc/nginx/fastcgi_params',
|
||||
'# Fix for HTTP/3 QUIC HTTP_HOST\n'
|
||||
'fastcgi_param\tHTTP_HOST\t$host;\n')
|
||||
if not WOFileUtils.grep(self, '/etc/nginx/proxy_params',
|
||||
'X-Forwarded-Host'):
|
||||
WOFileUtils.textappend(self, '/etc/nginx/proxy_params',
|
||||
'proxy_set_header X-Forwarded-Host $host;\n')
|
||||
if not WOFileUtils.grep(self, '/etc/nginx/proxy_params',
|
||||
'X-Forwarded-Port'):
|
||||
WOFileUtils.textappend(self, '/etc/nginx/proxy_params',
|
||||
'proxy_set_header X-Forwarded-Port $server_port;\n')
|
||||
try:
|
||||
data = dict(php="9000", debug="9001",
|
||||
php7="9070", debug7="9170",
|
||||
@@ -245,7 +258,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
||||
"$upstream_response_time "
|
||||
"$srcache_fetch_status "
|
||||
"[$time_local] '\n"
|
||||
"'$http_host \"$request\" $status"
|
||||
"'$host \"$request\" $status"
|
||||
" $body_bytes_sent '\n"
|
||||
"'\"$http_referer\" "
|
||||
"\"$http_user_agent\"';\n")
|
||||
@@ -884,7 +897,7 @@ def post_pref(self, apt_packages, packages, upgrade=False):
|
||||
"# Log format Settings\n"
|
||||
"log_format rt_cache_redis '$remote_addr "
|
||||
"$upstream_response_time $srcache_fetch_status "
|
||||
"[$time_local] '\n '$http_host \"$request\" "
|
||||
"[$time_local] '\n '$host \"$request\" "
|
||||
"$status $body_bytes_sent '\n'\"$http_referer\" "
|
||||
"\"$http_user_agent\"';\n")
|
||||
# set redis.conf parameter
|
||||
|
||||
Reference in New Issue
Block a user