fixed some fedora bugs, support LOCAL_PHP and LOCAL_PHP_PATH and sample variables.env
This commit is contained in:
@@ -6,7 +6,7 @@ load_module /usr/lib/nginx/modules/ngx_http_geoip2_module.so;
|
||||
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
|
||||
load_module /usr/lib/nginx/modules/ngx_http_lua_module.so;
|
||||
load_module /usr/lib/nginx/modules/ngx_http_modsecurity_module.so;
|
||||
load_module /usr/lib/nginx/modules/ngx_stream_geoip2_module.so;
|
||||
#load_module /usr/lib/nginx/modules/ngx_stream_geoip2_module.so;
|
||||
load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
|
||||
load_module /usr/lib/nginx/modules/ngx_http_brotli_static_module.so;
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
{% if REMOTE_PHP != "" +%}
|
||||
fastcgi_param SCRIPT_FILENAME {{ REMOTE_PHP_PATH }}/$fastcgi_script_name;
|
||||
{% elif LOCAL_PHP != "" +%}
|
||||
fastcgi_param SCRIPT_FILENAME {{ LOCAL_PHP_PATH }}/$fastcgi_script_name;
|
||||
{% else +%}
|
||||
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
|
||||
{% endif %}
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param CONTENT_TYPE $content_type;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass {{ REMOTE_PHP }}:9000;
|
||||
fastcgi_index index.php;
|
||||
{% if REMOTE_PHP != "" +%}
|
||||
fastcgi_pass {{ REMOTE_PHP }}:9000;
|
||||
{% elif LOCAL_PHP != "" +%}
|
||||
fastcgi_pass unix:{{ LOCAL_PHP }};
|
||||
{% endif %}
|
||||
fastcgi_index index.php;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ include /opt/bunkerized-nginx/pre-server-confs/{{ FIRST_SERVER }}/*.conf;
|
||||
server {
|
||||
|
||||
# FastCGI variables
|
||||
{% if REMOTE_PHP != "" +%}
|
||||
{% if REMOTE_PHP != "" or LOCAL_PHP != "" +%}
|
||||
include {{ NGINX_PREFIX }}fastcgi.conf;
|
||||
{% endif %}
|
||||
|
||||
@@ -181,7 +181,7 @@ server {
|
||||
{% endif %}
|
||||
|
||||
# remote PHP
|
||||
{% if REMOTE_PHP != "" +%}
|
||||
{% if REMOTE_PHP != "" or LOCAL_PHP != "" +%}
|
||||
include {{ NGINX_PREFIX }}php.conf;
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user