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

Commit de3cca6

Browse files
authored
Merge pull request #140 from jdeathe/issue/139
CLOSES #139: Updates image source to 1.10.5.
2 parents 2b37efa + 74162ae commit de3cca6

12 files changed

+160
-64
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Summary of release changes for Version 1.
66

77
CentOS-6 6.9 x86_64, Apache 2.2, PHP-CGI 5.3 (FastCGI), PHP memcached 1.0, PHP APC 3.1.
88

9+
### 1.10.5 - Unreleased
10+
11+
- Updates image source to [release 1.10.5](https://github.com/jdeathe/centos-ssh-apache-php/releases/tag/1.10.5).
12+
913
### 1.10.4 - 2018-01-29
1014

1115
- Updates image source to [release 1.10.4](https://github.com/jdeathe/centos-ssh-apache-php/releases/tag/1.10.4).

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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:1.10.4
7+
FROM jdeathe/centos-ssh-apache-php:1.10.5
88

99
# -----------------------------------------------------------------------------
1010
# FastCGI support

README.md

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To verify the container is initialised and running successfully by inspecting th
6060
$ docker logs apache-php.pool-1.1.1
6161
```
6262

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.
6464

6565
The `apachectl` command can be accessed as follows.
6666

@@ -72,7 +72,7 @@ $ docker exec -it apache-php.pool-1.1.1 apachectl -h
7272

7373
### Running
7474

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-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.
7676

7777
#### SCMI Installation Examples
7878

@@ -252,7 +252,7 @@ from your browser you can then access it with `http://app-1.local:8080` assuming
252252

253253
##### APACHE_CUSTOM_LOG_LOCATION & APACHE_CUSTOM_LOG_FORMAT
254254

255-
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.
256256

257257
```
258258
...
@@ -261,14 +261,30 @@ The Apache CustomLog can be defined using `APACHE_CUSTOM_LOG_LOCATION` to set a
261261
...
262262
```
263263

264+
To set a file path relative to `APACHE_CONTENT_ROOT` the path value should exclude a leading `/`.
265+
266+
```
267+
...
268+
--env "APACHE_CUSTOM_LOG_LOCATION=var/log/httpd_access_log" \
269+
...
270+
```
271+
264272
##### APACHE_ERROR_LOG_LOCATION & APACHE_ERROR_LOG_LEVEL
265273

266-
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.
267275

268276
```
269277
...
270278
--env "APACHE_ERROR_LOG_LOCATION=/var/log/httpd/error_log" \
271-
--env "APACHE_ERROR_LOG_FORMAT=error" \
279+
--env "APACHE_ERROR_LOG_LEVEL=error" \
280+
...
281+
```
282+
283+
To set a file path relative to `APACHE_CONTENT_ROOT` the path value should exclude a leading `/`.
284+
285+
```
286+
...
287+
--env "APACHE_ERROR_LOG_LOCATION=var/log/httpd_error_log" \
272288
...
273289
```
274290

@@ -303,11 +319,12 @@ The `APACHE_HEADER_X_SERVICE_UID` environmental variable is used to set a respon
303319

304320
##### APACHE_LOAD_MODULES
305321

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`.
307324

308325
```
309326
...
310-
--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 rewrite_module"
327+
--env "APACHE_LOAD_MODULES=env_module rewrite_module"
311328
...
312329
```
313330

@@ -362,7 +379,7 @@ The public directory is relative to the `APACHE_CONTENT_ROOT` and together they
362379

363380
##### APACHE_SSL_CERTIFICATE
364381

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 PEM encoded certificate bundle. To make a compatible certificate bundle use the `cat` command to combine the certificate files together.
366383

367384
```
368385
$ cat /usr/share/private/server-key.pem \
@@ -371,6 +388,8 @@ $ cat /usr/share/private/server-key.pem \
371388
> /usr/share/certs/server-bundle.pem
372389
```
373390

391+
Base64 encoding of the PEM file contents is recommended if not using the file path method.
392+
374393
*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}`.
375394

376395
```
@@ -381,6 +400,14 @@ $ cat /usr/share/private/server-key.pem \
381400
...
382401
```
383402

403+
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.
404+
405+
```
406+
...
407+
--env "APACHE_SSL_CERTIFICATE=/run/secrets/apache_ssl_certificate" \
408+
...
409+
```
410+
384411
##### APACHE_SSL_CIPHER_SUITE
385412

386413
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
434461
...
435462
```
436463

437-
##### PHP_OPTIONS_SESSION_SAVE_HANDLER & PHP_OPTIONS_SESSION_SAVE_PATH
464+
##### PHP_OPTIONS_SESSION_NAME, PHP_OPTIONS_SESSION_SAVE_HANDLER & PHP_OPTIONS_SESSION_SAVE_PATH
438465

439466
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.
440467

@@ -447,3 +474,12 @@ Using `PHP_OPTIONS_SESSION_NAME` a session name can be defined - otherwise the d
447474
--env "PHP_OPTIONS_SESSION_SAVE_PATH=memcached-server:11211" \
448475
...
449476
```
477+
478+
If using the files handler, to set a save path relative to `APACHE_CONTENT_ROOT` the path value should exclude a leading `/`.
479+
480+
```
481+
...
482+
--env "PHP_OPTIONS_SESSION_SAVE_HANDLER=files" \
483+
--env "PHP_OPTIONS_SESSION_SAVE_PATH=var/session" \
484+
...
485+
```

environment.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ APACHE_ERROR_LOG_LOCATION ?= var/log/apache_error_log
5858
APACHE_ERROR_LOG_LEVEL ?= warn
5959
APACHE_EXTENDED_STATUS_ENABLED ?= false
6060
APACHE_HEADER_X_SERVICE_UID ?= {{HOSTNAME}}
61-
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 version_module
61+
APACHE_LOAD_MODULES ?=
6262
APACHE_OPERATING_MODE ?= production
6363
APACHE_MOD_SSL_ENABLED ?= false
6464
APACHE_MPM ?= worker
@@ -74,4 +74,4 @@ APACHE_SYSTEM_USER ?= app
7474
PHP_OPTIONS_DATE_TIMEZONE ?= UTC
7575
PHP_OPTIONS_SESSION_NAME ?= PHPSESSID
7676
PHP_OPTIONS_SESSION_SAVE_HANDLER ?= files
77-
PHP_OPTIONS_SESSION_SAVE_PATH ?= /var/lib/php/session
77+
PHP_OPTIONS_SESSION_SAVE_PATH ?= var/session
-54.8 KB
Binary file not shown.
-29.6 KB
Binary file not shown.
-2.39 KB
Loading
-1.42 KB
Loading
-49.7 KB
Binary file not shown.

src/etc/systemd/system/centos-ssh-apache-php-fcgi@.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Environment="APACHE_ERROR_LOG_LOCATION=var/log/apache_error_log"
6565
Environment="APACHE_ERROR_LOG_LEVEL=warn"
6666
Environment="APACHE_EXTENDED_STATUS_ENABLED=false"
6767
Environment="APACHE_HEADER_X_SERVICE_UID={{HOSTNAME}}"
68-
Environment="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 version_module"
68+
Environment="APACHE_LOAD_MODULES="
6969
Environment="APACHE_MOD_SSL_ENABLED=false"
7070
Environment="APACHE_MPM=worker"
7171
Environment="APACHE_OPERATING_MODE=production"
@@ -81,7 +81,7 @@ Environment="APACHE_SYSTEM_USER=app"
8181
Environment="PHP_OPTIONS_DATE_TIMEZONE=UTC"
8282
Environment="PHP_OPTIONS_SESSION_NAME=PHPSESSID"
8383
Environment="PHP_OPTIONS_SESSION_SAVE_HANDLER=files"
84-
Environment="PHP_OPTIONS_SESSION_SAVE_PATH=/var/lib/php/session"
84+
Environment="PHP_OPTIONS_SESSION_SAVE_PATH=var/session"
8585

8686
# Initialisation: Load image from local storage if available, otherwise pull.
8787
ExecStartPre=/bin/bash -c \

0 commit comments

Comments
 (0)