Tianon Gravi
ea377551f7
Adjust "/var/www/html" permissions consistently across variants
...
The issue speaks for itself:
```console
$ docker run --rm php:apache ls -ld /var/www/html
drwxrwxrwx 2 www-data www-data 4096 Jan 22 21:56 /var/www/html
$ docker run --rm php:fpm ls -ld /var/www/html
drwxr-xr-x 2 root root 4096 Jan 22 22:10 /var/www/html
```
2019-01-31 14:45:15 -08:00
Tianon Gravi
c77c579341
Fix Apache "log directory" permissions for arbitrary user support
...
Tested successfully with both of (separately) `--user x:y --sysctl ...` and `-e APACHE_RUN_USER=x -e APACHE_RUN_GROUP=y` (and without any parameters, of course).
2018-11-26 16:50:37 -08:00
Tianon Gravi
e6a51689ce
Adjust permissions on Apache directories for running as an arbitrary user
2018-11-12 15:51:08 -08:00
Baldinof
c14ef6c61b
Enable cgi bin for cli variant
2018-06-11 14:08:44 -07:00
Tianon Gravi
7cd701b551
Replace "apache2-bin apache2.2-common" with "apache2"
...
The "apache2.2-common" package is already pulling in "apache2", which pulls in "apache2-bin" among other things, so let's simplify this block.
2017-05-09 13:17:43 -07:00
Joe Ferguson
800aea518e
Fix sed to modify the envvars file
2016-08-16 15:54:50 -07:00
Tianon Gravi
bb2c469018
Convert explicit "export A=B" lines of Apache's envvars file into "${A:=B}" such that we can override them at runtime easily
...
Before:
```sh
unset HOME
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX
export LANG=C
export LANG
```
After:
```sh
unset HOME
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi
: ${APACHE_RUN_USER:=www-data}
export APACHE_RUN_USER
: ${APACHE_RUN_GROUP:=www-data}
export APACHE_RUN_GROUP
: ${APACHE_PID_FILE:=/var/run/apache2/apache2$SUFFIX.pid}
export APACHE_PID_FILE
: ${APACHE_RUN_DIR:=/var/run/apache2$SUFFIX}
export APACHE_RUN_DIR
: ${APACHE_LOCK_DIR:=/var/lock/apache2$SUFFIX}
export APACHE_LOCK_DIR
: ${APACHE_LOG_DIR:=/var/log/apache2$SUFFIX}
export APACHE_LOG_DIR
: ${LANG:=C}
export LANG
export LANG
```
(minus comments)
2016-08-01 17:07:10 -07:00
Tianon Gravi
11c5d11f1d
Fix "AllowOverride" and "Indexes" defaults
2016-07-08 13:46:02 -07:00
Tianon Gravi
2dc37fa519
Source "envvars" in "apache2-foreground" (mimicking apache2ctl), and by so doing, use the default Debian apache2 configuration unmodified
2016-07-06 16:07:32 -07:00
Jens Erat
693ce7b4d2
Removed bashism in Dockerfile
2015-04-02 00:01:27 +02:00
Jens Erat
f6c40011c8
Empty config and sites folders, include them ( #76 )
2015-03-25 14:52:46 +01:00
Tianon Gravi
a6e6a6381d
Refactor Dockerfile, switching the base from buildpack-deps
over to debian
directly
...
This results in a dramatic reduction of image size:
```console
$ docker images php
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
php 5.4 6b03f428509e 3 hours ago 354.3 MB
php 5.4-apache 2bd126f2c469 2 minutes ago 394.8 MB
php 5.5 19a5113df69a 9 minutes ago 356.4 MB
php 5.5-apache 6c892721307f 2 minutes ago 396.9 MB
php 5.6 69aead156fe7 10 minutes ago 356.8 MB
php 5.6-apache 2d0bae628aaf About an hour ago 397.3 MB
```
vs the old:
```console
$ docker images php
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
php 5.4 e760b9bd2c6c 2 days ago 736.9 MB
php 5.4-apache 62c23e8f1704 2 days ago 811.8 MB
php 5.5 156d2a323bc0 2 days ago 739.8 MB
php 5.5-apache 3014d0f81b29 2 days ago 814.7 MB
php 5.6 dab86418397c 2 days ago 740.2 MB
php 5.6-apache b3c4a0633954 2 days ago 815.1 MB
```
2014-11-06 17:34:27 -07:00