danke für das preview
ich versuche es hier nocheinmal, könnten die folgenden änderungen in die nächste version mit aufgenommen werden?
Diff
diff --git a/nginx.lua b/nginx.lua
index 64d68a7..49f71bd 100644
--- a/nginx.lua
+++ b/nginx.lua
@@ -997,6 +997,10 @@ local function writePHPconfig(fh, opts, php, phpVersionsFCGI)
fh:write("\t\ttry_files $fastcgi_script_name =404;\n")
fh:write("\t\tfastcgi_split_path_info ^(.+\\.php)(/.*)$;\n")
fh:write("\t\tinclude /etc/nginx/fastcgi_params;\n")
+ if LC.fs.is_file(opts.path .. "/conf/fastcgi_params.conf") then
+ fh:write("\t\t# Include customer-specific configuration options:\n")
+ fh:write("\t\tinclude ", opts.path, "/conf/fastcgi_params.conf;\n")
+ end
fh:write("\t\tset $path_info $fastcgi_path_info;\n")
fh:write("\t\tfastcgi_param PATH_INFO $path_info;\n")
fh:write("\t\tfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n")
@@ -1019,6 +1023,10 @@ local function writePHPconfig(fh, opts, php, phpVersionsFCGI)
fh:write("\t\ttry_files $fastcgi_script_name =404;\n")
fh:write("\t\tfastcgi_split_path_info ^(.+\\.php)(/.*)$;\n")
fh:write("\t\tinclude /etc/nginx/fastcgi_params;\n")
+ if LC.fs.is_file(opts.path .. "/conf/fastcgi_params.conf") then
+ fh:write("\t\t# Include customer-specific configuration options:\n")
+ fh:write("\t\tinclude ", opts.path, "/conf/fastcgi_params.conf;\n")
+ end
fh:write("\t\tset $path_info $fastcgi_path_info;\n")
fh:write("\t\tfastcgi_param PATH_INFO $path_info;\n")
fh:write("\t\tfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n")
@@ -1340,6 +1348,10 @@ function configureVHost(cfg, opts, cnames)
end
fh:write("\tlocation / {\n")
fh:write("\t\tset $proxy_host ", host, ";\n")
+ fh:write("\t\tproxy_set_header\tHost\t$host;\n")
+ fh:write("\t\tproxy_set_header\tX-Real-IP\t$remote_addr;\n")
+ fh:write("\t\tproxy_set_header\tX-Forwarded-For\t$proxy_add_x_forwarded_for;\n")
+ fh:write("\t\tproxy_set_header\tX-Forwarded-Proto\t$scheme;\n")
fh:write("\t\tproxy_pass\t", proto, "://$proxy_host", path, "$request_uri;\n")
fh:write("\t}\n")
end
Alles anzeigen