Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit d94226b

Browse files
committed
Merge pull request #75 from jdeathe/master
Release changes ready for centos-6-1.4.4
2 parents a2f0601 + 554e1a1 commit d94226b

File tree

13 files changed

+172
-296
lines changed

13 files changed

+172
-296
lines changed

Dockerfile

Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
# CentOS-6, Apache 2.2, PHP 5.3, PHP Memcached 1.0, PHP APC 3.1.
55
#
66
# =============================================================================
7-
FROM jdeathe/centos-ssh-apache-php:centos-6-1.4.3
7+
FROM jdeathe/centos-ssh-apache-php:centos-6-1.4.4
88

99
MAINTAINER James Deathe <james.deathe@gmail.com>
1010

1111
# -----------------------------------------------------------------------------
1212
# FastCGI support
1313
# -----------------------------------------------------------------------------
1414
RUN rpm --rebuilddb \
15+
&& yum -y erase \
16+
php-5.3.3-46.el6_6 \
1517
&& yum --setopt=tsflags=nodocs -y install \
1618
fcgi-2.4.0-12.el6 \
1719
mod_fcgid-2.3.9-1.el6 \
@@ -21,72 +23,15 @@ RUN rpm --rebuilddb \
2123
&& rm -rf /var/cache/yum/* \
2224
&& yum clean all
2325

24-
# -----------------------------------------------------------------------------
25-
# Apache mime_magic module should be disabled with FastCGI
26-
# -----------------------------------------------------------------------------
27-
RUN sed -i \
28-
-e 's~^LoadModule mime_magic_module ~#LoadModule mime_magic_module ~g' \
29-
/etc/httpd/conf/httpd.conf
30-
31-
# -----------------------------------------------------------------------------
32-
# Enable the pathinfo fix
33-
# -----------------------------------------------------------------------------
34-
RUN sed -i \
35-
-e 's~^;cgi.fix_pathinfo=1$~cgi.fix_pathinfo=1~g' \
36-
/etc/php.ini
37-
38-
# -----------------------------------------------------------------------------
39-
# Disable mod_php
40-
# -----------------------------------------------------------------------------
41-
RUN mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.off \
42-
&& touch /etc/httpd/conf.d/php.conf \
43-
&& chmod 444 /etc/httpd/conf.d/php.conf
44-
45-
# -----------------------------------------------------------------------------
46-
# Add the PHP Wrapper script
47-
# -----------------------------------------------------------------------------
48-
ADD var/www/app-bin/php-wrapper /var/www/app-bin/
49-
RUN chmod -R 750 /var/www/app-bin
50-
5126
# -----------------------------------------------------------------------------
5227
# Copy files into place
5328
# -----------------------------------------------------------------------------
54-
ADD etc/apache-bootstrap /etc/
55-
ADD etc/services-config/httpd/apache-bootstrap.conf /etc/services-config/httpd/
5629
ADD etc/services-config/httpd/conf.d/fcgid.conf /etc/services-config/httpd/conf.d/
57-
RUN ln -sf /etc/services-config/httpd/apache-bootstrap.conf /etc/apache-bootstrap.conf \
58-
&& ln -sf /etc/services-config/httpd/conf.d/fcgid.conf /etc/httpd/conf.d/fcgid.conf \
59-
&& chmod +x /etc/apache-bootstrap
60-
61-
# -----------------------------------------------------------------------------
62-
# Set default environment variables used to identify the service container
63-
# -----------------------------------------------------------------------------
64-
# ENV SERVICE_UNIT_APP_GROUP app-1
65-
# ENV SERVICE_UNIT_LOCAL_ID 1
66-
# ENV SERVICE_UNIT_INSTANCE 1
30+
RUN ln -sf /etc/services-config/httpd/conf.d/fcgid.conf /etc/httpd/conf.d/fcgid.conf
6731

6832
# -----------------------------------------------------------------------------
6933
# Set default environment variables used to configure the service container
7034
# -----------------------------------------------------------------------------
71-
# ENV APACHE_CONTENT_ROOT /var/www/${PACKAGE_NAME}
72-
# ENV APACHE_CUSTOM_LOG_FORMAT combined
73-
# ENV APACHE_CUSTOM_LOG_LOCATION ${APACHE_CONTENT_ROOT}/var/log/apache_access_log
74-
# ENV APACHE_ERROR_LOG_LOCATION ${APACHE_CONTENT_ROOT}/var/log/apache_error_log
75-
# ENV APACHE_ERROR_LOG_LEVEL warn
76-
# ENV APACHE_EXTENDED_STATUS_ENABLED false
77-
# ENV APACHE_LOAD_MODULES "authz_user_module log_config_module expires_module deflate_module headers_module setenvif_module mime_module status_module dir_module alias_module"
78-
# ENV APACHE_MOD_SSL_ENABLED false
79-
# ENV APACHE_PUBLIC_DIRECTORY public_html
80-
# ENV APACHE_RUN_GROUP app-www
81-
# ENV APACHE_RUN_USER app-www
82-
# ENV APACHE_SERVER_ALIAS ""
83-
# ENV APACHE_SERVER_NAME app-1.local
84-
# ENV APACHE_SUEXEC_USER_GROUP false
85-
# ENV APACHE_SYSTEM_USER app
8635
ENV HTTPD /usr/sbin/httpd.worker
87-
# ENV PACKAGE_PATH ${PACKAGE_PATH}
88-
# ENV PHP_OPTIONS_DATE_TIMEZONE UTC
89-
90-
# EXPOSE 80 8443 443
9136

9237
CMD ["/usr/bin/supervisord", "--configuration=/etc/supervisord.conf"]

apache-php.app-1.1.1@8080.service

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RestartSec=30
2929
TimeoutStartSec=1200
3030
Environment="DOCKER_IMAGE_PACKAGE_PATH=/var/services-packages"
3131
Environment="DOCKER_IMAGE_NAME=jdeathe/centos-ssh-apache-php-fcgi"
32-
Environment="DOCKER_IMAGE_TAG=centos-6-1.4.3"
32+
Environment="DOCKER_IMAGE_TAG=centos-6-1.4.4"
3333
Environment="SERVICE_UNIT_APP_GROUP=app-1"
3434
Environment="SERVICE_UNIT_LOCAL_ID=1"
3535
Environment="SERVICE_UNIT_INSTANCE=1"
@@ -51,7 +51,6 @@ Environment="APACHE_RUN_USER=app-www"
5151
Environment="APACHE_SERVER_ALIAS=app-1"
5252
Environment="APACHE_SERVER_HOME=/var/www"
5353
Environment="APACHE_SERVER_NAME=app-1.local"
54-
Environment="APACHE_SUEXEC_USER_GROUP=false"
5554
Environment="APACHE_SYSTEM_USER=app"
5655
Environment="HTTPD=/usr/sbin/httpd.worker"
5756
Environment="PHP_OPTIONS_DATE_TIMEZONE=UTC"
@@ -140,7 +139,6 @@ ExecStart=/bin/sudo /bin/bash -c \
140139
--env \"APACHE_RUN_USER=${APACHE_RUN_USER}\" \
141140
--env \"APACHE_SERVER_ALIAS=${APACHE_SERVER_ALIAS}\" \
142141
--env \"APACHE_SERVER_NAME=${APACHE_SERVER_NAME}\" \
143-
--env \"APACHE_SUEXEC_USER_GROUP=${APACHE_SUEXEC_USER_GROUP}\" \
144142
--env \"APACHE_SYSTEM_USER=${APACHE_SYSTEM_USER}\" \
145143
--env \"HTTPD=${HTTPD}\" \
146144
--env \"PHP_OPTIONS_DATE_TIMEZONE=${PHP_OPTIONS_DATE_TIMEZONE}\" \

etc/apache-bootstrap

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ OPTS_APACHE_RUN_GROUP="${APACHE_RUN_GROUP:-${DEFAULT_APACHE_USER}}"
274274
OPTS_APACHE_RUN_USER="${APACHE_RUN_USER:-${DEFAULT_APACHE_USER}}"
275275
OPTS_APACHE_SERVER_ALIAS="${APACHE_SERVER_ALIAS:-}"
276276
OPTS_APACHE_SERVER_NAME="${APACHE_SERVER_NAME:-$(hostname)}"
277-
OPTS_APACHE_SUEXEC_USER_GROUP="${APACHE_SUEXEC_USER_GROUP:-false}"
278277
OPTS_APACHE_SYSTEM_USER="${APACHE_SYSTEM_USER:-${DEFAULT_SYSTEM_USER}}"
279278

280279
# Generate SSL certificate.
@@ -387,7 +386,8 @@ set_apache_server_name ${OPTS_APACHE_SERVER_NAME} 80
387386

388387
# Enable Apache modules
389388
APACHE_MODULES_ENABLED=$(
390-
enable_apache_modules "${OPTS_APACHE_LOAD_MODULES}"
389+
enable_apache_modules "${OPTS_APACHE_LOAD_MODULES}" \
390+
| sort
391391
)
392392

393393
# Generate an SSL VirtualHost configuration if required
@@ -413,29 +413,11 @@ else
413413
> /etc/httpd/conf.d/ssl.conf
414414
fi
415415

416-
VIRTUAL_HOST_CONFIGURATION_FILES="${OPTS_APACHE_CONTENT_ROOT}/vhost.conf"
417-
if [[ ${OPTS_APACHE_MOD_SSL_ENABLED} == true ]]; then
418-
VIRTUAL_HOST_CONFIGURATION_FILES+=" ${OPTS_APACHE_CONTENT_ROOT}/vhost-ssl.conf"
419-
fi
420-
421-
# Set the Apache (run) service user/group
422-
if [[ ${OPTS_APACHE_SUEXEC_USER_GROUP} == true ]]; then
423-
sed -i \
424-
-e 's~#SuexecUserGroup \(.*\)$~SuexecUserGroup \1~g' \
425-
-e 's~app/bin/php-wrapper~app-bin/php-wrapper~g' \
426-
${VIRTUAL_HOST_CONFIGURATION_FILES}
427-
else
428-
sed -i \
429-
-e 's~\([^#]\)SuexecUserGroup \(.*\)$~\1#SuexecUserGroup \2~g' \
430-
-e 's~app/bin/php-wrapper~app-bin/php-wrapper~g' \
431-
${VIRTUAL_HOST_CONFIGURATION_FILES}
432-
fi
433-
434416
# Set ownership for fcgid php-wrapper and socket if necessary
435-
if [[ -d /var/www/app-bin && -d /var/run/mod_fcgid ]]; then
417+
if [[ -d ${PACKAGE_PATH}/bin && -d /var/run/mod_fcgid ]]; then
436418
chown -R \
437419
${OPTS_APACHE_RUN_USER}:${OPTS_APACHE_RUN_GROUP} \
438-
/var/{www/app-bin,run/mod_fcgid}
420+
{${PACKAGE_PATH}/bin,/var/run/mod_fcgid}
439421
fi
440422

441423
# Set the system user's login names and groups

etc/services-config/httpd/apache-bootstrap.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ APACHE_RUN_GROUP="${APACHE_RUN_GROUP:-app-www}"
2828
APACHE_RUN_USER="${APACHE_RUN_USER:-app-www}"
2929
APACHE_SERVER_ALIAS="${APACHE_SERVER_ALIAS:-}"
3030
APACHE_SERVER_NAME="${APACHE_SERVER_NAME:-${SERVICE_UNIT_APP_GROUP}.local}"
31-
APACHE_SUEXEC_USER_GROUP="${APACHE_SUEXEC_USER_GROUP:-false}"
3231
APACHE_SYSTEM_USER="${APACHE_SYSTEM_USER:-app}"
3332
HTTPD="${HTTPD:-/usr/sbin/httpd}"
3433
PHP_OPTIONS_DATE_TIMEZONE="${PHP_OPTIONS_DATE_TIMEZONE:-UTC}"

etc/services-config/httpd/conf.d/fcgid.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
LoadModule fcgid_module modules/mod_fcgid.so
88

99
<IfModule mod_fcgid.c>
10-
# Use FastCGI to process .fcg .fcgi & .fpl scripts
11-
AddHandler fcgid-script fcg fcgi fpl
10+
# Use FastCGI to process .fcg .fcgi .fpl & .php scripts
11+
AddHandler fcgid-script fcg fcgi fpl php
12+
AddType text/html php
13+
14+
# Add index.php to the list of files that will be served as directory
15+
# indexes.
16+
DirectoryIndex index.php
1217

1318
# Sane place to put sockets and shared memory file
1419
FcgidIPCDir /var/run/mod_fcgid

etc/services-config/httpd/conf.d/php.conf.default

Lines changed: 0 additions & 28 deletions
This file was deleted.

etc/services-config/httpd/conf.d/php.conf.off

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)