- 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).
This commit is contained in:
AlkorZ3 committed 2026-10-31 19:10:05 +01:00
1 parent 97480f993b
commit 1ad3205db3
4 files changed
+52 -29

No files matched your search

+37 -26
View File
@@ -74,7 +74,7 @@ ARG HTTPD_CONF='#---------------------------------------------------------------
# prefix_int should be formated as: "", "aaa/" or "aaa/bbb/"... \n\ # prefix_int should be formated as: "", "aaa/" or "aaa/bbb/"... \n\
#------------------------------------------------------------------------------- \n\ #------------------------------------------------------------------------------- \n\
\n\ \n\
<Macro _Proxy $prefix_ext $prefix_int $host $port> \n\ <Macro _Proxy $prefix_ext $prefix_int $proto $host $port> \n\
\n\ \n\
RewriteCond "`$prefix_ext`" "!= ``" \n\ RewriteCond "`$prefix_ext`" "!= ``" \n\
RewriteRule "^/$prefix_ext$" "/$prefix_ext/" [R,L] \n\ RewriteRule "^/$prefix_ext$" "/$prefix_ext/" [R,L] \n\
@@ -82,8 +82,16 @@ ARG HTTPD_CONF='#---------------------------------------------------------------
<Location /$prefix_ext/> \n\ <Location /$prefix_ext/> \n\
Require all granted \n\ Require all granted \n\
\n\ \n\
ProxyPass http://$host:$port/$prefix_int flushpackets=on nocanon \n\ ProxyPass $proto://$host:$port/$prefix_int flushpackets=on nocanon \n\
ProxyPassReverse http://$host:$port/$prefix_int \n\ ProxyPassReverse $proto://$host:$port/$prefix_int \n\
\n\
# PreserveHost \n\
<If "`$proto` == `https`"> \n\
ProxyPreserveHost Off \n\
</If> \n\
<Else> \n\
ProxyPreserveHost On \n\
</Else> \n\
\n\ \n\
# CookiePath Mapping \n\ # CookiePath Mapping \n\
<If "`$prefix_int` != ``"> \n\ <If "`$prefix_int` != ``"> \n\
@@ -105,7 +113,7 @@ ARG HTTPD_CONF='#---------------------------------------------------------------
RequestHeader setifempty X-Forwarded-Prefix "/$prefix_ext" \n\ RequestHeader setifempty X-Forwarded-Prefix "/$prefix_ext" \n\
\n\ \n\
# Fix absolute Location headers (with domain) \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\ \n\
# Fix relative Location headers (starting with /) \n\ # Fix relative Location headers (starting with /) \n\
Header edit* Location ^/(?!$prefix_ext/)(.*)$ /$prefix_ext/$1 \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\ # Warning: prefix_* should be formated as: "", "aaa" or "aaa/bbb"... \n\
#------------------------------------------------------------------------------- \n\ #------------------------------------------------------------------------------- \n\
\n\ \n\
<Macro Proxy_Ext $prefix_ext $host $port> \n\ <Macro Proxy_Ext $prefix_ext $proto $host $port> \n\
Use _Proxy $prefix_ext "" $host $port \n\ Use _Proxy $prefix_ext "" $proto $host $port \n\
</Macro> \n\ </Macro> \n\
\n\ \n\
<Macro Proxy_Int $prefix_ext $prefix_int $host $port> \n\ <Macro Proxy_Int $prefix_ext $prefix_int $proto $host $port> \n\
Use _Proxy "" $prefix_int/ $host $port \n\ Use _Proxy "" $prefix_int/ $proto $host $port \n\
</Macro> \n\ </Macro> \n\
\n\ \n\
<Macro Proxy_Ext_Int $prefix_ext $prefix_int $host $port> \n\ <Macro Proxy_Ext_Int $prefix_ext $prefix_int $proto $host $port> \n\
Use _Proxy $prefix_ext $prefix_int/ $host $port \n\ Use _Proxy $prefix_ext $prefix_int/ $proto $host $port \n\
</Macro> \n\ </Macro> \n\
\n\ \n\
\n\ \n\
@@ -139,10 +147,12 @@ RewriteEngine On
\n\ \n\
# Reverse Proxy Configuration \n\ # Reverse Proxy Configuration \n\
ProxyRequests Off \n\ ProxyRequests Off \n\
ProxyPreserveHost On \n\
AllowEncodedSlashes NoDecode \n\ AllowEncodedSlashes NoDecode \n\
\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\
<Directory /var/www/html> \n\ <Directory /var/www/html> \n\
Options Includes Indexes FollowSymLinks \n\ Options Includes Indexes FollowSymLinks \n\
@@ -162,20 +172,21 @@ ARG INFO_PHP='<?php
RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \ RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \
&& urpmi.update -a \ && urpmi.update -a \
&& urpmi --force apache 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 \ && 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%#LoadModule macro_module modules/mod_macro.so%LoadModule macro_module modules/mod_macro.so%" /etc/httpd/conf/modules.d/00_base.conf \
&& mv /etc/httpd/conf/sites.d/00_default_vhosts.conf /etc/httpd/conf/sites.d/00-default_vhost.conf \ && sed -i -e "s%^Listen 443%#Listen 443%" /etc/httpd/conf/conf.d/ssl.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 \ && mv /etc/httpd/conf/sites.d/00_default_vhosts.conf /etc/httpd/conf/sites.d/00-default_vhost.conf \
&& mkdir /etc/httpd/conf/sites.d/default_vhost.d \ && 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 \
&& rm -f /var/log/README \ && mkdir /etc/httpd/conf/sites.d/default_vhost.d \
&& echo -e "${HTTPD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/httpd \ && rm -f /var/log/README \
&& chmod a+x /etc/init.d/httpd \ && echo -e "${HTTPD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/httpd \
&& ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \ && chmod a+x /etc/init.d/httpd \
&& echo -e "${HTTPD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/httpd.ini \ && ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \
&& echo -e "${HTTPD_CONF}" | sed -e "s/\`/'/g" -e 's/ *$//' > ${HTTPD_CONF_FILE} \ && echo -e "${HTTPD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/httpd.ini \
&& echo -e "${INFO_PHP}" | sed -e "s/\`/'/g" -e 's/ *$//' > /var/www/html/info.php && 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
+4 -2
View File
@@ -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. This project aims to build a PHP + Apache docker image used by other Rx3 packaging projects.
Features: Features:
- Curtently based on rx3-docker/server:1.4.0-mga9 image, - Currently based on rx3-docker/server:1.4.1-mga9 image,
- default_vhost.d layout support, - default_vhost.d layout support,
- PostgreSQL & MySQL ready, - PostgreSQL & MySQL ready,
- PHPMailer installed, - PHPMailer installed,
- logrotate configured, - logrotate configured,
- Apache UID, GID & document root directory configurable, - Apache UID, GID & document root directory configurable,
- mod_proxy + mod_proxy_html installed, - mod_proxy + mod_proxy_html installed,
- md_ssl installed (to support ssl proxy) with Rx3 CA support,
- Proxy Apache macro, - Proxy Apache macro,
- HTTPD service enabled by default (APACHE_HTTPD_ENABLED), - HTTPD service enabled by default (APACHE_HTTPD_ENABLED),
- PHP_MEMORY_LIMIT variable set to 512M by default, - 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.
+10
View File
@@ -1,3 +1,13 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/PHP-Apache V 1.7.3 - A. GIBERT - 2026/10/31
------------------------------------------------------------------------------------------------------------------------------------
- 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 Rx3-Docker/PHP-Apache V 1.7.2 - A. GIBERT - 2026/10/26
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
+1 -1
View File
@@ -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 | # | 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