bunkerweb 1.4.0
This commit is contained in:
31
core/php/confs/server-http/fastcgi.conf
Normal file
31
core/php/confs/server-http/fastcgi.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
{% 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;
|
||||
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;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param REQUEST_SCHEME $scheme;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
14
core/php/confs/server-http/php.conf
Normal file
14
core/php/confs/server-http/php.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
{% if REMOTE_PHP != "" or LOCAL_PHP != "" +%}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
{% if REMOTE_PHP != "" +%}
|
||||
set $backend "{{ REMOTE_PHP }}:9000";
|
||||
fastcgi_pass $backend;
|
||||
{% elif LOCAL_PHP != "" +%}
|
||||
fastcgi_pass unix:{{ LOCAL_PHP }};
|
||||
{% endif %}
|
||||
fastcgi_index index.php;
|
||||
}
|
||||
{% endif %}
|
||||
7
core/php/confs/server-http/redirect.conf
Normal file
7
core/php/confs/server-http/redirect.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
{% if REDIRECT_TO != "" +%}
|
||||
{% if REDIRECT_TO_REQUEST_URI == "yes" +%}
|
||||
return 301 {{ REDIRECT_TO }}$request_uri;
|
||||
{% else +%}
|
||||
return 301 {{ REDIRECT_TO }};
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
45
core/php/plugin.json
Normal file
45
core/php/plugin.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"id": "php",
|
||||
"order": 999,
|
||||
"name": "PHP",
|
||||
"description": "Manage local or remote PHP-FPM.",
|
||||
"version": "0.1",
|
||||
"settings": {
|
||||
"REMOTE_PHP": {
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"help": "Hostname of the remote PHP-FPM instance.",
|
||||
"id": "remote-php",
|
||||
"label": "Remote PHP",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
},
|
||||
"REMOTE_PHP_PATH": {
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"help": "Root folder containing files in the remote PHP-FPM instance.",
|
||||
"id": "remote-php-path",
|
||||
"label": "Remote PHP path",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
},
|
||||
"LOCAL_PHP": {
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"help": "Path to the PHP-FPM socket file.",
|
||||
"id": "local",
|
||||
"label": "Local PHP",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
},
|
||||
"LOCAL_PHP_PATH": {
|
||||
"context": "multisite",
|
||||
"default": "",
|
||||
"help": "Root folder containing files in the local PHP-FPM instance.",
|
||||
"id": "local-php-path",
|
||||
"label": "Local PHP path",
|
||||
"regex": "^.*$",
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user