Compare commits

...
Author SHA1 Message Date
AlkorZ3 1ad3205db3 - 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).
2026-10-31 19:10:05 +01:00
AlkorZ3 97480f993b - Add PHP_DISABLED_FUNCTIONS environment variable. 2026-10-26 11:34:50 +01:00
AlkorZ3 0861d07521 - Now use docker-tools-1.5.3,
- Rebuild for updates (PHP 8.2.35).
2026-10-21 22:55:55 +02:00
AlkorZ3 5a79b87b01 - Now use rx3-docker/server:1.4.0-mga9 image,
- Now use docker-tools-1.5.2,
- Rebuild for updates.
2026-05-30 11:53:07 +02:00
5 changed files with 85 additions and 26 deletions

No files matched your search

+26 -14
View File
@@ -46,6 +46,7 @@ done
sed -i -e "s/memory_limit = 128M/memory_limit = ${PHP_MEMORY_LIMIT}/" /etc/php.d/01_ressourcelimits.ini \n\ sed -i -e "s/memory_limit = 128M/memory_limit = ${PHP_MEMORY_LIMIT}/" /etc/php.d/01_ressourcelimits.ini \n\
sed -i -e "s/upload_max_filesize = 16M/upload_max_filesize = ${PHP_UPLOAD_LIMIT}/" /etc/php.d/01_fileuploads.ini \n\ sed -i -e "s/upload_max_filesize = 16M/upload_max_filesize = ${PHP_UPLOAD_LIMIT}/" /etc/php.d/01_fileuploads.ini \n\
sed -i -e "s/post_max_size = 8M/post_max_size = ${PHP_UPLOAD_LIMIT}/" /etc/php.d/01_datahandling.ini \n\ sed -i -e "s/post_max_size = 8M/post_max_size = ${PHP_UPLOAD_LIMIT}/" /etc/php.d/01_datahandling.ini \n\
sed -i -e "s/disable_functions =/disable_functions = ${PHP_DISABLED_FUNCTIONS}/" /etc/php.d/01_language.ini \n\
\n\ \n\
# HTTPD enabled by default \n\ # HTTPD enabled by default \n\
if [[ "${APACHE_HTTPD_ENABLED}" == "FALSE" ]] \n\ if [[ "${APACHE_HTTPD_ENABLED}" == "FALSE" ]] \n\
@@ -73,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\
@@ -81,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\
@@ -104,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\
@@ -120,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\
@@ -138,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\
@@ -161,10 +172,11 @@ 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 \
&& 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 \ && 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 \ && 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 \ && mkdir /etc/httpd/conf/sites.d/default_vhost.d \
+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.3.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.
+44 -7
View File
@@ -1,3 +1,40 @@
------------------------------------------------------------------------------------------------------------------------------------
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
------------------------------------------------------------------------------------------------------------------------------------
- Add PHP_DISABLED_FUNCTIONS environment variable.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/PHP-Apache V 1.7.1 - A. GIBERT - 2026/10/21
------------------------------------------------------------------------------------------------------------------------------------
- Now use docker-tools-1.5.3,
- Rebuild for updates (PHP 8.2.35).
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/PHP-Apache V 1.7.0 - A. GIBERT - 2026/05/30
------------------------------------------------------------------------------------------------------------------------------------
- Now use rx3-docker/server:1.4.0-mga9 image,
- Now use docker-tools-1.5.2,
- Rebuild for updates.
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/PHP-Apache V 1.6.3 - A. GIBERT - 2026/03/01 Rx3-Docker/PHP-Apache V 1.6.3 - A. GIBERT - 2026/03/01
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
@@ -11,7 +48,7 @@ Rx3-Docker/PHP-Apache V 1.6.2 - A. GIBERT - 2026/02/16
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
- Add ISL support, - Add ISL support,
- Use now rx3-docker/server:1.3.0-mga9 image, - Now Use rx3-docker/server:1.3.0-mga9 image,
- Fix rx3.conf file renaming bug. - Fix rx3.conf file renaming bug.
- Rebuild for updates. - Rebuild for updates.
@@ -34,7 +71,7 @@ Rx3-Docker/PHP-Apache V 1.6.0 - A. GIBERT - 2025/12/01
- Switch to new default_vhost.d layout, - Switch to new default_vhost.d layout,
- Fix error when APACHE_UID / APACHE_GID not provided, - Fix error when APACHE_UID / APACHE_GID not provided,
- Perform HTTPD initialisation even when not activated, - Perform HTTPD initialisation even when not activated,
- Use now rx3-docker/server:1.2.7-mga9 image, - Now use rx3-docker/server:1.2.7-mga9 image,
- Rebuild for updates. - Rebuild for updates.
@@ -43,7 +80,7 @@ Rx3-Docker/PHP-Apache V 1.6.0 - A. GIBERT - 2025/12/01
Rx3-Docker/PHP-Apache V 1.5.4 - A. GIBERT - 2025/09/19 Rx3-Docker/PHP-Apache V 1.5.4 - A. GIBERT - 2025/09/19
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
- Use now rx3-docker/server:1.2.6-mga9 image, - Now use rx3-docker/server:1.2.6-mga9 image,
- Rebuild for updates. - Rebuild for updates.
@@ -52,7 +89,7 @@ Rx3-Docker/PHP-Apache V 1.5.4 - A. GIBERT - 2025/09/19
Rx3-Docker/PHP-Apache V 1.5.3 - A. GIBERT - 2025/04/21 Rx3-Docker/PHP-Apache V 1.5.3 - A. GIBERT - 2025/04/21
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
- Use now rx3-docker/server:1.2.2-mga9 image. - Now use rx3-docker/server:1.2.2-mga9 image.
@@ -61,7 +98,7 @@ Rx3-Docker/PHP-Apache V 1.5.2 - A. GIBERT - 2025/03/08
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
- Add PHP_MEMORY_LIMIT & PHP_UPLOAD_LIMIT environment variable, - Add PHP_MEMORY_LIMIT & PHP_UPLOAD_LIMIT environment variable,
- Use now rx3-docker/server:1.2.1-mga9 image. - Now use rx3-docker/server:1.2.1-mga9 image.
@@ -88,7 +125,7 @@ Rx3-Docker/PHP-Apache V 1.4.0 - A. GIBERT - 2024/11/11
- Move & Rename repo from Rx3/PHP-Apache-MGA9 to Rx3-Docker/PHP-Apache, - Move & Rename repo from Rx3/PHP-Apache-MGA9 to Rx3-Docker/PHP-Apache,
- New version naming standard, - New version naming standard,
- Now use docker_tools for .env building, - Now use docker_tools for .env building,
- Use now rx3-docker/server:1.2.0-mga9 image, - Now use rx3-docker/server:1.2.0-mga9 image,
- Add /var/log/init, /var/log/supervisor & var/log/httpd volumes. - Add /var/log/init, /var/log/supervisor & var/log/httpd volumes.
@@ -105,7 +142,7 @@ Rx3/PHP-Apache-Mga9 V 1.3.3 - A. GIBERT - 2024/10/05
- post_max_size from 8M to 32M, - post_max_size from 8M to 32M,
- Don't expose unneeded /var/www/html in compose file, - Don't expose unneeded /var/www/html in compose file,
- Variabilization of external server ports in env & compose file, - Variabilization of external server ports in env & compose file,
- Use now docker_tools for .env building. - Now use docker_tools for .env building.
+2
View File
@@ -29,12 +29,14 @@ services:
restart: unless-stopped restart: unless-stopped
environment: environment:
SERVER_CROND_ENABLED: ${WA_SERVER_CROND_ENABLED}
APACHE_UID: ${WA_USER_ID} APACHE_UID: ${WA_USER_ID}
APACHE_GID: ${WA_GROUP_ID} APACHE_GID: ${WA_GROUP_ID}
APACHE_DOC_ROOT: ${WA_DOC_ROOT} APACHE_DOC_ROOT: ${WA_DOC_ROOT}
APACHE_HTTPD_ENABLED: ${WA_APACHE_HTTPD_ENABLED} APACHE_HTTPD_ENABLED: ${WA_APACHE_HTTPD_ENABLED}
PHP_MEMORY_LIMIT: ${WA_PHP_MEMORY_LIMIT} PHP_MEMORY_LIMIT: ${WA_PHP_MEMORY_LIMIT}
PHP_UPLOAD_LIMIT: ${WA_PHP_UPLOAD_LIMIT} PHP_UPLOAD_LIMIT: ${WA_PHP_UPLOAD_LIMIT}
PHP_DISABLED_FUNCTIONS: ${WA_PHP_DISABLED_FUNCTIONS}
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"] test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"]
+9 -3
View File
@@ -5,7 +5,6 @@
# Global Settings # Global Settings
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
ORG_NAME="rx3-docker" ORG_NAME="rx3-docker"
ORG_REGISTRY="docker.xor.rx3:5000" ORG_REGISTRY="docker.xor.rx3:5000"
ORG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>' ORG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
@@ -17,6 +16,8 @@ ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Image Settings # Image Settings
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
APPL_NAME=""
HOST_NAME_PREFIX="" HOST_NAME_PREFIX=""
PORT_ENV_OFFSET=0 PORT_ENV_OFFSET=0
@@ -38,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.6.3-mga9 ${ORG_URL_PREFIX} server 1.3.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
@@ -46,9 +47,14 @@ docker_service_add WA webapp ${ORG_URL_PREFIX}
# User Settings # User Settings
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
SERVER_CROND_ENABLED="FALSE" WA_SERVER_CROND_ENABLED="FALSE"
WA_DOC_ROOT="/var/www/html" WA_DOC_ROOT="/var/www/html"
WA_APACHE_HTTPD_ENABLED="TRUE" WA_APACHE_HTTPD_ENABLED="TRUE"
WA_PHP_MEMORY_LIMIT="512M" WA_PHP_MEMORY_LIMIT="512M"
WA_PHP_UPLOAD_LIMIT="32M" WA_PHP_UPLOAD_LIMIT="32M"
#WA_PHP_DISABLED_FUNCTIONS="phpinfo"
WA_PHP_DISABLED_FUNCTIONS=""