Add APACHE_PORT
This commit is contained in:
parent
457aa21336
commit
3bc3566efe
|
@ -132,4 +132,13 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
|
|||
echo >&2 "========================================================================"
|
||||
fi
|
||||
|
||||
if [[ "$1" == apache2* ]]; then
|
||||
if [ -n "${APACHE_PORT+x}" ]; then
|
||||
echo "Setting apache port to ${APACHE_PORT}."
|
||||
sed -i "s/VirtualHost \*:80/VirtualHost \*:${APACHE_PORT}/g" /etc/apache2/sites-enabled/000-default.conf
|
||||
sed -i "s/Listen 80/Listen ${APACHE_PORT}/g" /etc/apache2/ports.conf
|
||||
apachectl configtest
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
|
Loading…
Reference in New Issue