trying to fix PHP bug in Linux

This commit is contained in:
bunkerity 2022-08-12 10:37:02 +02:00
parent 5c99a4b0e2
commit 34c648830b
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
4 changed files with 8 additions and 8 deletions

View File

@ -13,7 +13,13 @@ fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
{% if REMOTE_PHP != "" +%}
fastcgi_param DOCUMENT_ROOT {{ REMOTE_PHP_PATH }};
{% elif LOCAL_PHP != "" +%}
fastcgi_param DOCUMENT_ROOT {{ LOCAL_PHP_PATH }};
{% else +%}
fastcgi_param DOCUMENT_ROOT $document_root;
{% endif %}
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;

View File

@ -3,6 +3,7 @@ location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include {{ NGINX_PREFIX }}/fastcgi_params;
{% if REMOTE_PHP != "" +%}
set $backend "{{ REMOTE_PHP }}:9000";
fastcgi_pass $backend;

View File

@ -1,7 +0,0 @@
{% if REDIRECT_TO != "" +%}
{% if REDIRECT_TO_REQUEST_URI == "yes" +%}
return 301 {{ REDIRECT_TO }}$request_uri;
{% else +%}
return 301 {{ REDIRECT_TO }};
{% endif %}
{% endif %}

View File

@ -16,4 +16,4 @@ fi
cp -r ./bw-data/www/* /opt/bunkerweb/www
chown -R $user:nginx /opt/bunkerweb/www
find /opt/bunkerweb/www -type f -exec chmod 0640 {} \;
find /opt/bunkerweb/www -type d -exec chmod 0750 {} \;
find /opt/bunkerweb/www -type d -exec chmod 0750 {} \;