2016-07-25 02:54:40 +00:00
|
|
|
#!/bin/bash
|
2016-08-06 00:29:06 +00:00
|
|
|
# @app pluie/alpine-apache
|
|
|
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
2016-07-25 02:54:40 +00:00
|
|
|
|
2016-08-09 01:08:26 +00:00
|
|
|
mkdir -p /app/$WWW_DIR
|
|
|
|
chown -R 1000:apache /app/$WWW_DIR
|
2016-07-25 02:54:40 +00:00
|
|
|
chmod -R 755 /scripts/pre-init.d
|
2016-07-29 15:09:39 +00:00
|
|
|
mkdir -p /run/apache2
|
|
|
|
chown apache:apache /run/apache2
|
2016-08-09 01:08:26 +00:00
|
|
|
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
|
|
|
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
2016-07-25 02:54:40 +00:00
|
|
|
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
2016-07-29 15:09:39 +00:00
|
|
|
sed -i 's#\#LoadModule rewrite_module modules/mod_rewrite.so#LoadModule rewrite_module modules/mod_rewrite.so#' /etc/apache2/httpd.conf
|
2016-07-29 11:51:56 +00:00
|
|
|
sed -ir 's/expose_php = On/expose_php = Off/' /etc/php5/php.ini
|
2016-07-25 02:54:40 +00:00
|
|
|
echo -e "\nIncludeOptional /app/vhost" >> /etc/apache2/httpd.conf
|
2016-08-09 01:08:26 +00:00
|
|
|
unset tmpsed
|