diff --git a/confs/site/php.conf b/confs/site/php.conf index 4b356a5..8b7c8ca 100644 --- a/confs/site/php.conf +++ b/confs/site/php.conf @@ -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; } diff --git a/entrypoint/site-config.sh b/entrypoint/site-config.sh index 39bdec9..441c500 100644 --- a/entrypoint/site-config.sh +++ b/entrypoint/site-config.sh @@ -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 diff --git a/examples/multisite-custom-server-confs/server-confs/nc.website.com/nextcloud.conf b/examples/multisite-custom-server-confs/server-confs/nc.website.com/nextcloud.conf index 22c73d4..b32bf62 100644 --- a/examples/multisite-custom-server-confs/server-confs/nc.website.com/nextcloud.conf +++ b/examples/multisite-custom-server-confs/server-confs/nc.website.com/nextcloud.conf @@ -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)(?:$|\/) { diff --git a/examples/reverse-proxy-multisite/docker-compose.yml b/examples/reverse-proxy-multisite/docker-compose.yml index fe5a2d8..6973f9b 100644 --- a/examples/reverse-proxy-multisite/docker-compose.yml +++ b/examples/reverse-proxy-multisite/docker-compose.yml @@ -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 diff --git a/examples/reverse-proxy-singlesite/docker-compose.yml b/examples/reverse-proxy-singlesite/docker-compose.yml index a99b7dd..27b5926 100644 --- a/examples/reverse-proxy-singlesite/docker-compose.yml +++ b/examples/reverse-proxy-singlesite/docker-compose.yml @@ -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 diff --git a/examples/reverse-proxy-singlesite/server-confs/redirects.conf b/examples/reverse-proxy-singlesite/server-confs/redirects.conf new file mode 100644 index 0000000..2951a30 --- /dev/null +++ b/examples/reverse-proxy-singlesite/server-confs/redirects.conf @@ -0,0 +1,4 @@ +port_in_redirect off; +location ~ ^/(app1|app2)$ { + rewrite ^(.*)$ $1/ permanent; +} diff --git a/examples/tomcat/docker-compose.yml b/examples/tomcat/docker-compose.yml index c3997c9..e6d8274 100644 --- a/examples/tomcat/docker-compose.yml +++ b/examples/tomcat/docker-compose.yml @@ -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 diff --git a/examples/tor-hidden-service/docker-compose.yml b/examples/tor-hidden-service/docker-compose.yml index fa8d66b..04d2650 100644 --- a/examples/tor-hidden-service/docker-compose.yml +++ b/examples/tor-hidden-service/docker-compose.yml @@ -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