PHP backup server

#24
This commit is contained in:
Szekeres Bálint
2018-11-02 14:24:32 +01:00
parent 83a28ee6dc
commit 6d590c6e1c
5 changed files with 37 additions and 6 deletions

View File

@@ -8,7 +8,14 @@ events {
worker_connections 65535;
}
http {
http {<!--
✔ PHP backup --><span ng-if="isPHPBackup()">
upstream php {
server {{ data.php_server[0] === '/' ? 'unix:' : '' }}{{ data.php_server }};
server {{ data.php_server_backup[0] === '/' ? 'unix:' : '' }}{{ data.php_server_backup }} backup;
}
</span>
charset utf-8;
sendfile on;
tcp_nopush on;

View File

@@ -1,7 +1,7 @@
try_files $uri =404;
# fastcgi
fastcgi_pass {{ data.php_connection[0] === '/' ? 'unix:' : '' }}{{ data.php_connection }};
fastcgi_pass {{ !isPHPBackup() ? ((data.php_server[0] === '/' ? 'unix:' : '') + data.php_server) : 'php' }};
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;