diff --git a/Dockerfile b/Dockerfile index 6d511b9..a8ac241 100644 --- a/Dockerfile +++ b/Dockerfile @@ -74,7 +74,7 @@ ARG HTTPD_CONF='#--------------------------------------------------------------- # prefix_int should be formated as: "", "aaa/" or "aaa/bbb/"... \n\ #------------------------------------------------------------------------------- \n\ \n\ - \n\ + \n\ \n\ RewriteCond "`$prefix_ext`" "!= ``" \n\ RewriteRule "^/$prefix_ext$" "/$prefix_ext/" [R,L] \n\ @@ -82,8 +82,16 @@ ARG HTTPD_CONF='#--------------------------------------------------------------- \n\ Require all granted \n\ \n\ - ProxyPass http://$host:$port/$prefix_int flushpackets=on nocanon \n\ - ProxyPassReverse http://$host:$port/$prefix_int \n\ + ProxyPass $proto://$host:$port/$prefix_int flushpackets=on nocanon \n\ + ProxyPassReverse $proto://$host:$port/$prefix_int \n\ + \n\ + # PreserveHost \n\ + \n\ + ProxyPreserveHost Off \n\ + \n\ + \n\ + ProxyPreserveHost On \n\ + \n\ \n\ # CookiePath Mapping \n\ \n\ @@ -105,7 +113,7 @@ ARG HTTPD_CONF='#--------------------------------------------------------------- RequestHeader setifempty X-Forwarded-Prefix "/$prefix_ext" \n\ \n\ # Fix absolute Location headers (with domain) \n\ - Header edit* Location ^(https?://[^/]+)/(?!$prefix_ext/)(.*)$ $1/$prefix_ext/$2 \n\ + Header edit* Location ^($proto://[^/]+)/(?!$prefix_ext/)(.*)$ $1/$prefix_ext/$2 \n\ \n\ # Fix relative Location headers (starting with /) \n\ Header edit* Location ^/(?!$prefix_ext/)(.*)$ /$prefix_ext/$1 \n\ @@ -121,16 +129,16 @@ ARG HTTPD_CONF='#--------------------------------------------------------------- # Warning: prefix_* should be formated as: "", "aaa" or "aaa/bbb"... \n\ #------------------------------------------------------------------------------- \n\ \n\ - \n\ - Use _Proxy $prefix_ext "" $host $port \n\ + \n\ + Use _Proxy $prefix_ext "" $proto $host $port \n\ \n\ \n\ - \n\ - Use _Proxy "" $prefix_int/ $host $port \n\ + \n\ + Use _Proxy "" $prefix_int/ $proto $host $port \n\ \n\ \n\ - \n\ - Use _Proxy $prefix_ext $prefix_int/ $host $port \n\ + \n\ + Use _Proxy $prefix_ext $prefix_int/ $proto $host $port \n\ \n\ \n\ \n\ @@ -139,10 +147,12 @@ RewriteEngine On \n\ # Reverse Proxy Configuration \n\ ProxyRequests Off \n\ -ProxyPreserveHost On \n\ AllowEncodedSlashes NoDecode \n\ \n\ - \n\ +# SSL Reverse Proxy Configuration \n\ +SSLProxyEngine On \n\ +SSLProxyVerify require \n\ +SSLProxyCACertificateFile /etc/pki/tls/certs/ca-bundle.crt \n\ \n\ \n\ Options Includes Indexes FollowSymLinks \n\ @@ -162,20 +172,21 @@ ARG INFO_PHP=' /etc/init.d/httpd \ - && chmod a+x /etc/init.d/httpd \ - && ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \ - && echo -e "${HTTPD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/httpd.ini \ - && echo -e "${HTTPD_CONF}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${HTTPD_CONF_FILE} \ - && echo -e "${INFO_PHP}" | sed -e "s/\`/'/g" -e 's/ *$//' > /var/www/html/info.php +RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \ + && urpmi.update -a \ + && urpmi --force apache apache-mod_ssl apache-mod_proxy apache-mod_proxy_html apache-mod_php php-cli php-pgsql php-mysqli php-pdo_pgsql php-pdo_mysql php-phpmailer pwauth \ + && sed -i -e "s%#LoadModule macro_module modules/mod_macro.so%LoadModule macro_module modules/mod_macro.so%" /etc/httpd/conf/modules.d/00_base.conf \ + && sed -i -e "s%^Listen 443%#Listen 443%" /etc/httpd/conf/conf.d/ssl.conf \ + && mv /etc/httpd/conf/sites.d/00_default_vhosts.conf /etc/httpd/conf/sites.d/00-default_vhost.conf \ + && sed -i -e "s%ServerName localhost%ServerName localhost\n\n Include conf/sites.d/default_vhost.d/*.conf%" /etc/httpd/conf/sites.d/00-default_vhost.conf \ + && mkdir /etc/httpd/conf/sites.d/default_vhost.d \ + && rm -f /var/log/README \ + && echo -e "${HTTPD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/httpd \ + && chmod a+x /etc/init.d/httpd \ + && ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \ + && echo -e "${HTTPD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/httpd.ini \ + && echo -e "${HTTPD_CONF}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${HTTPD_CONF_FILE} \ + && echo -e "${INFO_PHP}" | sed -e "s/\`/'/g" -e 's/ *$//' > /var/www/html/info.php diff --git a/ReadMe.txt b/ReadMe.txt index 1da939f..0bc8012 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -5,17 +5,19 @@ Welcome to Rx3-Docker/PHP-Apache docker image! This project aims to build a PHP + Apache docker image used by other Rx3 packaging projects. Features: - - Curtently based on rx3-docker/server:1.4.0-mga9 image, + - Curtently based on rx3-docker/server:1.4.1-mga9 image, - default_vhost.d layout support, - PostgreSQL & MySQL ready, - PHPMailer installed, - logrotate configured, - Apache UID, GID & document root directory configurable, - mod_proxy + mod_proxy_html installed, + - md_ssl installed (to support ssl proxy) with Rx3 CA support, - Proxy Apache macro, - HTTPD service enabled by default (APACHE_HTTPD_ENABLED), - PHP_MEMORY_LIMIT variable set to 512M by default, - - PHP_UPLOAD_LIMIT variable set to 32M by defaylt. + - PHP_UPLOAD_LIMIT variable set to 32M by defaylt, + - PHP_DISABLED_FUNCTIONS support. diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 810106a..64393dc 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,13 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/PHP-Apache V 1.7.3 - A. GIBERT - 2026/10/30 +------------------------------------------------------------------------------------------------------------------------------------ + +- Add mod_ssl to support https reverse proxy, +- Add proto arg to Proxy_Ext, Proxy_Int & Proxy_Ext_Int macros (Warning: Interface break!), +- Now use rx3-docker/server:1.4.1-mga9 image (Rx3 CA support). + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3-Docker/PHP-Apache V 1.7.2 - A. GIBERT - 2026/10/26 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/env.dist b/env.dist index 304add9..0793d7a 100644 --- a/env.dist +++ b/env.dist @@ -39,7 +39,7 @@ DOCKER_TOOLS_EXEPTION_LIBS="httpd:/var/www/html" # | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id | #------------------+----------+--------------------------+--------------------+------------------+-------------------------------+-----------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ -docker_service_add WA webapp ${ORG_URL_PREFIX} php-apache "Rx3-Docker/PHP-Apache" 1.7.2-mga9 ${ORG_URL_PREFIX} server 1.4.0-mga9 httpd - 8080 80 - - apache apache +docker_service_add WA webapp ${ORG_URL_PREFIX} php-apache "Rx3-Docker/PHP-Apache" 1.7.3-mga9 ${ORG_URL_PREFIX} server 1.4.1-mga9 httpd - 8080 80 - - apache apache