You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+61-25Lines changed: 61 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ Apache PHP web server, loading only a minimal set of Apache modules by default.
7
7
8
8
## Overview & links
9
9
10
-
The latest CentOS-6 based release can be pulled from the centos-6 Docker tag. For a specific release tag the convention is `centos-6-1.10.4` or `1.10.4` for the [1.10.4](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/tree/1.7.0) release tag.
10
+
The latest CentOS-6 based release can be pulled from the centos-6 Docker tag. For a specific release tag the convention is `centos-6-1.10.5` or `1.10.5` for the [1.10.5](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/tree/1.7.0) release tag.
This build of [Apache](https://httpd.apache.org/), (httpd CentOS package), uses the [mod_fcgid](https://httpd.apache.org/mod_fcgid/) module to run [PHP](http://php.net/) as a [FastCGI](http://www.fastcgi.com/) process.
15
15
@@ -60,7 +60,7 @@ To verify the container is initialised and running successfully by inspecting th
60
60
$ docker logs apache-php.pool-1.1.1
61
61
```
62
62
63
-
On first run, the bootstrap script, ([/usr/sbin/httpd-bootstrap](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/usr/sbin/httpd-bootstrap)), will check if the DocumentRoot directory is empty and, if so, will populate it with the example app scripts and VirtualHost configuration files.
63
+
On first run, the bootstrap script, ([/usr/sbin/httpd-bootstrap](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/src/usr/sbin/httpd-bootstrap)), will check if the DocumentRoot directory is empty and, if so, will populate it with the example app scripts and VirtualHost configuration files.
64
64
65
65
The `apachectl` command can be accessed as follows.
To run the a docker container from this image you can use the standard docker commands. Alternatively, you can use the embedded (Service Container Manager Interface) [scmi](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/usr/sbin/scmi) that is included in the image since `centos-6-1.7.1` or, if you have a checkout of the [source repository](https://github.com/jdeathe/centos-ssh-apache-php-fcgi), and have make installed the Makefile provides targets to build, install, start, stop etc. where environment variables can be used to configure the container options and set custom docker run parameters.
75
+
To run the a docker container from this image you can use the standard docker commands. Alternatively, you can use the embedded (Service Container Manager Interface) [scmi](https://github.com/jdeathe/centos-ssh/blob/centos-6/src/usr/sbin/scmi) that is included in the image since `centos-6-1.7.1` or, if you have a checkout of the [source repository](https://github.com/jdeathe/centos-ssh-apache-php-fcgi), and have make installed the Makefile provides targets to build, install, start, stop etc. where environment variables can be used to configure the container options and set custom docker run parameters.
76
76
77
77
#### SCMI Installation Examples
78
78
@@ -87,10 +87,10 @@ $ docker run \
87
87
--volume /:/media/root \
88
88
--env BASH_ENV="" \
89
89
--env ENV="" \
90
-
jdeathe/centos-ssh-apache-php-fcgi:1.10.4 \
90
+
jdeathe/centos-ssh-apache-php-fcgi:1.10.5 \
91
91
/usr/sbin/scmi install \
92
92
--chroot=/media/root \
93
-
--tag=1.10.4 \
93
+
--tag=1.10.5 \
94
94
--name=apache-php.pool-1.1.1
95
95
```
96
96
@@ -105,10 +105,10 @@ $ docker run \
105
105
--volume /:/media/root \
106
106
--env BASH_ENV="" \
107
107
--env ENV="" \
108
-
jdeathe/centos-ssh-apache-php-fcgi:1.10.4 \
108
+
jdeathe/centos-ssh-apache-php-fcgi:1.10.5 \
109
109
/usr/sbin/scmi uninstall \
110
110
--chroot=/media/root \
111
-
--tag=1.10.4 \
111
+
--tag=1.10.5 \
112
112
--name=apache-php.pool-1.1.1
113
113
```
114
114
@@ -123,10 +123,10 @@ $ docker run \
123
123
--volume /:/media/root \
124
124
--env BASH_ENV="" \
125
125
--env ENV="" \
126
-
jdeathe/centos-ssh-apache-php-fcgi:1.10.4 \
126
+
jdeathe/centos-ssh-apache-php-fcgi:1.10.5 \
127
127
/usr/sbin/scmi install \
128
128
--chroot=/media/root \
129
-
--tag=1.10.4 \
129
+
--tag=1.10.5 \
130
130
--name=apache-php.pool-1.1.1 \
131
131
--manager=systemd \
132
132
--register \
@@ -150,7 +150,7 @@ To see detailed information about the image run `scmi` with the `--info` option.
150
150
$ eval "sudo -E $(
151
151
docker inspect \
152
152
-f "{{.ContainerConfig.Labels.install}}" \
153
-
jdeathe/centos-ssh-apache-php-fcgi:1.10.4
153
+
jdeathe/centos-ssh-apache-php-fcgi:1.10.5
154
154
) --info"
155
155
```
156
156
@@ -160,7 +160,7 @@ To perform an installation using the docker name `apache-php.pool-1.2.1` simply
160
160
$ eval "sudo -E $(
161
161
docker inspect \
162
162
-f "{{.ContainerConfig.Labels.install}}" \
163
-
jdeathe/centos-ssh-apache-php-fcgi:1.10.4
163
+
jdeathe/centos-ssh-apache-php-fcgi:1.10.5
164
164
) --name=apache-php.pool-1.2.1"
165
165
```
166
166
@@ -170,7 +170,7 @@ To uninstall use the *same command* that was used to install but with the `unins
170
170
$ eval "sudo -E $(
171
171
docker inspect \
172
172
-f "{{.ContainerConfig.Labels.uninstall}}" \
173
-
jdeathe/centos-ssh-apache-php-fcgi:1.10.4
173
+
jdeathe/centos-ssh-apache-php-fcgi:1.10.5
174
174
) --name=apache-php.pool-1.2.1"
175
175
```
176
176
@@ -181,15 +181,15 @@ With the addition of install/uninstall image labels it is possible to use [Proje
181
181
_NOTE:_ A prerequisite of the following examples is that the image has been pulled (or loaded from the release package).
The Apache CustomLog can be defined using `APACHE_CUSTOM_LOG_LOCATION` to set a file | pipe location and `APACHE_CUSTOM_LOG_FORMAT` to specify the required LogFormat nickname.
255
+
The Apache CustomLog can be defined using `APACHE_CUSTOM_LOG_LOCATION` to set a file, (or pipe), location and `APACHE_CUSTOM_LOG_FORMAT` to specify the required LogFormat nickname.
256
256
257
257
```
258
258
...
@@ -261,14 +261,30 @@ The Apache CustomLog can be defined using `APACHE_CUSTOM_LOG_LOCATION` to set a
261
261
...
262
262
```
263
263
264
+
To set a file path relative to `APACHE_CONTENT_ROOT` the path value should exclude a leading `/`.
The Apache ErrorLog can be defined using `APACHE_ERROR_LOG_LOCATION` to set a file | pipe location and `APACHE_ERROR_LOG_LEVEL` to specify the required LogLevel value.
274
+
The Apache ErrorLog can be defined using `APACHE_ERROR_LOG_LOCATION` to set a file, (or pipe), location and `APACHE_ERROR_LOG_LEVEL` to specify the required LogLevel value.
@@ -303,11 +319,12 @@ The `APACHE_HEADER_X_SERVICE_UID` environmental variable is used to set a respon
303
319
304
320
##### APACHE_LOAD_MODULES
305
321
306
-
The variable `APACHE_LOAD_MODULES` defines all Apache modules to be loaded from */etc/httpd/conf/http.conf*. The default is the minimum required so you may need to add more as necessary. To add the "mod\_rewrite" Apache Module you would add it's identifier `rewrite_module` to the array as follows.
322
+
By default, the image loads a minimal set of required Apache modules. To load additional modules the
323
+
`APACHE_LOAD_MODULES` can be used. To load both the `mod_env` and `mod_rewrite` Apache Modules use the respective module identifiers. i.e. `env_module` and `rewrite_module`.
@@ -362,7 +379,7 @@ The public directory is relative to the `APACHE_CONTENT_ROOT` and together they
362
379
363
380
##### APACHE_SSL_CERTIFICATE
364
381
365
-
The `APACHE_SSL_CERTIFICATE` environment variable is used to define a PEM, (and optionally base64), encoded certificate bundle. Base64 encoding of the PEM file contents is recommended. To make a compatible certificate bundle use the `cat` command to combine the certificate files together.
382
+
The `APACHE_SSL_CERTIFICATE` environment variable is used to define a PEMencoded certificate bundle. To make a compatible certificate bundle use the `cat` command to combine the certificate files together.
Base64 encoding of the PEM file contents is recommended if not using the file path method.
392
+
374
393
*Note:* The `base64` command on Mac OSX will encode a file without line breaks by default but if using the command on Linux you need to include use the `-w` option to prevent wrapping lines at 80 characters. i.e. `base64 -w 0 -i {certificate-path}`.
If set to a valid container file path the value will be read from the file - this allows for setting the value securely when combined with an orchestration feature such as Docker Swarm secrets.
Use the `APACHE_SSL_CIPHER_SUITE` environment variable to define an appropriate Cipher Suite. The default "intermediate" selection should be suitable for most use-cases where support for a wide range browsers is necessary.
@@ -434,7 +461,7 @@ To set the timezone for the UK and account for British Summer Time you would use
Using `PHP_OPTIONS_SESSION_SAVE_HANDLER` and `PHP_OPTIONS_SESSION_SAVE_PATH` together it's possible to configure PHP to use an alternative `session.save_handler` and `session.save_path`. For example if you have a Memcached server running on the host `memcached-server` on the default port `11211` the following configuration will allow session data to be stored in Memcached, allowing session data to be shared between multiple PHP containers.
440
467
@@ -447,3 +474,12 @@ Using `PHP_OPTIONS_SESSION_NAME` a session name can be defined - otherwise the d
0 commit comments