php config and examples fixes
This commit is contained in:
parent
dd7768c856
commit
eaf817d57a
|
@ -1,5 +1,7 @@
|
|||
include %FASTCGI_PATH%fastcgi.conf;
|
||||
include %FASTCGI_PATH%fastcgi_params;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass %REMOTE_PHP%:9000;
|
||||
fastcgi_index index.php;
|
||||
include %FASTCGI_PATH%fastcgi.conf;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,8 @@ if [ "$REMOTE_PHP" != "" ] ; then
|
|||
replace_in_file "${NGINX_PREFIX}php.conf" "%REMOTE_PHP%" "$REMOTE_PHP"
|
||||
replace_in_file "${NGINX_PREFIX}php.conf" "%FASTCGI_PATH%" "$NGINX_PREFIX"
|
||||
if [ "$MULTISITE" = "yes" ] ; then
|
||||
cp /etc/nginx/fastcgi.conf ${NGINX_PREFIX}fastcgi.conf
|
||||
cp /etc/nginx/fastcgi.conf ${NGINX_PREFIX}fastcgi.conf
|
||||
cp /etc/nginx/fastcgi_params ${NGINX_PREFIX}fastcgi_params
|
||||
fi
|
||||
replace_in_file "${NGINX_PREFIX}fastcgi.conf" "\$document_root" "${REMOTE_PHP_PATH}/"
|
||||
else
|
||||
|
|
|
@ -11,7 +11,7 @@ location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
|
|||
}
|
||||
|
||||
location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
|
||||
include fastcgi_params;
|
||||
include /etc/nginx/nc.website.com/fastcgi_params;
|
||||
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
|
||||
set $path_info $fastcgi_path_info;
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
@ -23,7 +23,7 @@ location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|u
|
|||
fastcgi_pass mync:9000;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_request_buffering off;
|
||||
include fastcgi.conf;
|
||||
include /etc/nginx/nc.website.com/fastcgi.conf;
|
||||
}
|
||||
|
||||
location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
|
||||
|
|
|
@ -11,7 +11,7 @@ services:
|
|||
volumes:
|
||||
- ./letsencrypt:/etc/letsencrypt
|
||||
environment:
|
||||
- USE_MULTISITE=yes
|
||||
- MULTISITE=yes
|
||||
- SERVER_NAME=app1.website.com app2.website.com # replace with your domain
|
||||
- SERVE_FILES=no
|
||||
- DISABLE_DEFAULT_SERVER=yes
|
||||
|
|
|
@ -10,6 +10,7 @@ services:
|
|||
- 443:8443
|
||||
volumes:
|
||||
- ./letsencrypt:/etc/letsencrypt
|
||||
- ./server-confs:/server-confs:ro # redirect /app1 and /app2 to /app1/ and /app2/
|
||||
environment:
|
||||
- SERVER_NAME=www.website.com # replace with your domain
|
||||
- SERVE_FILES=no
|
||||
|
@ -20,10 +21,10 @@ services:
|
|||
- USE_GZIP=yes
|
||||
- USE_BROTLI=yes
|
||||
- USE_REVERSE_PROXY=yes
|
||||
- REVERSE_PROXY_URL_1=/app1
|
||||
- REVERSE_PROXY_HOST_1=http://app1:3000
|
||||
- REVERSE_PROXY_URL_2=/app2
|
||||
- REVERSE_PROXY_HOST_2=http://app2
|
||||
- REVERSE_PROXY_URL_1=/app1/
|
||||
- REVERSE_PROXY_HOST_1=http://app1:3000/
|
||||
- REVERSE_PROXY_URL_2=/app2/
|
||||
- REVERSE_PROXY_HOST_2=http://app2/
|
||||
|
||||
app1:
|
||||
image: node
|
||||
|
@ -40,4 +41,4 @@ services:
|
|||
restart: always
|
||||
environment:
|
||||
- PMA_ARBITRARY=1
|
||||
- PMA_ABSOLUTE_URI=https://www.website.com/app2 # replace with your absolute URI
|
||||
- PMA_ABSOLUTE_URI=https://www.website.com/app2/ # replace with your absolute URI
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
port_in_redirect off;
|
||||
location ~ ^/(app1|app2)$ {
|
||||
rewrite ^(.*)$ $1/ permanent;
|
||||
}
|
|
@ -21,7 +21,7 @@ services:
|
|||
- USE_BROTLI=yes
|
||||
- USE_REVERSE_PROXY=yes
|
||||
- REVERSE_PROXY_URL=/
|
||||
- REVERSE_PROXY_HOST=http://mytomcat:8080/sample
|
||||
- REVERSE_PROXY_HOST=http://mytomcat:8080/sample/
|
||||
|
||||
mytomcat:
|
||||
image: tomcat
|
||||
|
|
|
@ -26,7 +26,7 @@ services:
|
|||
- USE_WHITELIST_REVERSE=no
|
||||
- USE_BLACKLIST_IP=no
|
||||
- USE_BLACKLIST_REVERSE=no
|
||||
- USE_FAIL2BAN=no
|
||||
- USE_ANTIBOT=captcha
|
||||
- USE_CLIENT_CACHE=yes
|
||||
- USE_GZIP=yes
|
||||
- USE_BROTLI=yes
|
||||
|
|
Loading…
Reference in New Issue