diff --git a/.gitignore b/.gitignore index e1d076434d15b8cd4d216782ecce38209cb91b08..526bd4c53bd3158bb1eadbf78b8adb31da6c8ea4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /packages/ /public_html/inc_config.php /shellscripts/getfile.sh.cfg +static/* \ No newline at end of file diff --git a/docker/containers/web-server/Dockerfile b/docker/containers/web-server/Dockerfile index 6b7b12ce2ce98dff24a5654f64172d997fcf484d..0c170625f65e6eb10181b31ff7ac139e951cbb8f 100644 --- a/docker/containers/web-server/Dockerfile +++ b/docker/containers/web-server/Dockerfile @@ -7,7 +7,7 @@ FROM php:8.2-apache RUN apt-get update && apt-get install -y git unzip zip libapache2-mod-xsendfile # enable apache modules -RUN a2enmod +RUN a2enmod xsendfile # install php packages COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ diff --git a/docker/containers/web-server/apache/sites-enabled/vhost_app.conf b/docker/containers/web-server/apache/sites-enabled/vhost_app.conf index 34b4d1efe24d67b6fb567eff0d321439578190e2..6d6e7fb93c99508aa2db13b821f858632966c90f 100644 --- a/docker/containers/web-server/apache/sites-enabled/vhost_app.conf +++ b/docker/containers/web-server/apache/sites-enabled/vhost_app.conf @@ -1,5 +1,5 @@ # -# GENERATED BY init.sh - template: ./templates/vhost_app.conf - 5809b7f8d1f4882c4f3569c9ea042045 +# GENERATED BY init.sh - template: ./templates/vhost_app.conf - 4dfd63417ad808a5ed00ffaf117464a8 # <VirtualHost *:80> DocumentRoot /var/www/ci-pkg/public_html @@ -12,6 +12,9 @@ # redirect requests to handle packages <Location "/packages"> + # for Php as php-fpm service: + # SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 + RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] @@ -20,7 +23,7 @@ # download files are outside webroot XSendFile On - XSendFilePath "/var/www/${APP_NAME}/example-packages/" + XSendFilePath "/var/www/ci-pkg/example-packages/" # example to prevent access with http <Location "/no-access"> diff --git a/docker/init.sh.cfg b/docker/init.sh.cfg index 62027160bfb0babbf7e7a1ca19b8c3e89d973a63..b96727ecfc897540f1dbbe911cd3293f12d74558 100644 --- a/docker/init.sh.cfg +++ b/docker/init.sh.cfg @@ -15,7 +15,7 @@ APP_PORT=8001 APP_APT_PACKAGES="git unzip zip libapache2-mod-xsendfile" #APP_APACHE_MODULES="rewrite" -APP_APACHE_MODULES="" +APP_APACHE_MODULES="xsendfile" APP_PHP_VERSION=8.2 # APP_PHP_MODULES="curl pdo_mysql mbstring xml zip xdebug" diff --git a/docker/templates/vhost_app.conf b/docker/templates/vhost_app.conf index 56ce04246496a755b2ec02c3cc044a1e9d368ea0..7dcadadf78dda6ebabf4da613836f5fda115eb2c 100644 --- a/docker/templates/vhost_app.conf +++ b/docker/templates/vhost_app.conf @@ -24,7 +24,7 @@ # download files are outside webroot XSendFile On - XSendFilePath "/var/www/${APP_NAME}/example-packages/" + XSendFilePath "/var/www/{{APP_NAME}}/example-packages/" # example to prevent access with http <Location "/no-access">