fix apache $WWW-DIR creation
This commit is contained in:
parent
9852484282
commit
3951d9deb1
Binary file not shown.
|
@ -20,19 +20,12 @@ function a2setModule(){
|
||||||
if [ ! -f /usr/lib/libxml2.so ]; then
|
if [ ! -f /usr/lib/libxml2.so ]; then
|
||||||
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||||
fi
|
fi
|
||||||
if [ ! -d /app/$WWW_DIR ]; then
|
|
||||||
mkdir -p /app/$WWW_DIR
|
|
||||||
fi
|
|
||||||
if [ ! -d /run/apache2 ]; then
|
if [ ! -d /run/apache2 ]; then
|
||||||
mkdir /run/apache2
|
mkdir /run/apache2
|
||||||
fi
|
fi
|
||||||
chown -R 1000:apache /app/$WWW_DIR
|
|
||||||
chmod -R 755 /scripts/pre-init.d
|
chmod -R 755 /scripts/pre-init.d
|
||||||
mkdir -p /run/apache2
|
mkdir -p /run/apache2
|
||||||
chown apache:apache /run/apache2
|
chown apache:apache /run/apache2
|
||||||
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
|
||||||
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
|
||||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
|
||||||
initTitle "Apache" "Loading Modules"
|
initTitle "Apache" "Loading Modules"
|
||||||
a2setModule 1 "rewrite"
|
a2setModule 1 "rewrite"
|
||||||
a2setModule 1 "mpm_event"
|
a2setModule 1 "mpm_event"
|
||||||
|
|
|
@ -2,6 +2,17 @@
|
||||||
# @app pluie/alpine-apache
|
# @app pluie/alpine-apache
|
||||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -d /app/$WWW_DIR ]; then
|
||||||
|
CREATE_WWW_DIR=1
|
||||||
|
mkdir -p /app/$WWW_DIR
|
||||||
|
fi
|
||||||
|
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||||
|
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||||
|
fi
|
||||||
|
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
||||||
|
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
||||||
|
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
||||||
|
|
||||||
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
||||||
chown -R 1000:apache /app/$WWW_DIR
|
chown -R 1000:apache /app/$WWW_DIR
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -z "/app/vhost" ]; then
|
||||||
cat <<EOF > "/app/vhost"
|
cat <<EOF > "/app/vhost"
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName $HTTP_SERVER_NAME
|
ServerName $HTTP_SERVER_NAME
|
||||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||||
<FilesMatch \.php$>
|
<FilesMatch \.php$>
|
||||||
SetHandler proxy:fcgi://127.0.0.1:9000
|
SetHandler proxy:fcgi://127.0.0.1:9000
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
Binary file not shown.
|
@ -22,21 +22,14 @@ fi
|
||||||
if [ ! -f /usr/lib/libxml2.so ]; then
|
if [ ! -f /usr/lib/libxml2.so ]; then
|
||||||
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||||
fi
|
fi
|
||||||
if [ ! -d /app/$WWW_DIR ]; then
|
|
||||||
mkdir -p /app/$WWW_DIR
|
|
||||||
fi
|
|
||||||
if [ ! -d /run/apache2 ]; then
|
if [ ! -d /run/apache2 ]; then
|
||||||
mkdir /run/apache2
|
mkdir /run/apache2
|
||||||
fi
|
fi
|
||||||
chown -R 1000:apache /app/$WWW_DIR
|
|
||||||
chmod -R 755 /scripts/pre-init.d
|
chmod -R 755 /scripts/pre-init.d
|
||||||
mkdir -p /run/apache2
|
mkdir -p /run/apache2
|
||||||
chown apache:apache /run/apache2
|
chown apache:apache /run/apache2
|
||||||
|
|
||||||
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
|
||||||
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
|
||||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
|
||||||
|
|
||||||
initTitle "Apache" "Loading Modules"
|
initTitle "Apache" "Loading Modules"
|
||||||
a2setModule 1 "rewrite"
|
a2setModule 1 "rewrite"
|
||||||
a2setModule 1 "mpm_prefork"
|
a2setModule 1 "mpm_prefork"
|
||||||
|
|
|
@ -2,6 +2,17 @@
|
||||||
# @app pluie/alpine-apache
|
# @app pluie/alpine-apache
|
||||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -d /app/$WWW_DIR ]; then
|
||||||
|
CREATE_WWW_DIR=1
|
||||||
|
mkdir -p /app/$WWW_DIR
|
||||||
|
fi
|
||||||
|
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||||
|
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||||
|
fi
|
||||||
|
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
||||||
|
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
||||||
|
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
||||||
|
|
||||||
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
||||||
chown -R 1000:apache /app/$WWW_DIR
|
chown -R 1000:apache /app/$WWW_DIR
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -z "/app/vhost" ]; then
|
||||||
cat <<EOF > "/app/vhost"
|
cat <<EOF > "/app/vhost"
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName $HTTP_SERVER_NAME
|
ServerName $HTTP_SERVER_NAME
|
||||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||||
<Directory /app/$WWW_DIR>
|
<Directory /app/$WWW_DIR>
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|
Binary file not shown.
|
@ -19,21 +19,14 @@ function a2setModule(){
|
||||||
if [ ! -f /usr/lib/libxml2.so ]; then
|
if [ ! -f /usr/lib/libxml2.so ]; then
|
||||||
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
ln -s /usr/lib/libxml2.so.2 /usr/lib/libxml2.so
|
||||||
fi
|
fi
|
||||||
if [ ! -d /app/$WWW_DIR ]; then
|
|
||||||
mkdir -p /app/$WWW_DIR
|
|
||||||
fi
|
|
||||||
if [ ! -d /run/apache2 ]; then
|
if [ ! -d /run/apache2 ]; then
|
||||||
mkdir /run/apache2
|
mkdir /run/apache2
|
||||||
fi
|
fi
|
||||||
chown -R 1000:apache /app/$WWW_DIR
|
|
||||||
chmod -R 755 /scripts/pre-init.d
|
chmod -R 755 /scripts/pre-init.d
|
||||||
mkdir -p /run/apache2
|
mkdir -p /run/apache2
|
||||||
chown apache:apache /run/apache2
|
chown apache:apache /run/apache2
|
||||||
|
|
||||||
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
|
||||||
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
|
||||||
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
|
||||||
|
|
||||||
initTitle "Apache" "Loading Modules"
|
initTitle "Apache" "Loading Modules"
|
||||||
a2setModule 1 "rewrite"
|
a2setModule 1 "rewrite"
|
||||||
a2setModule 1 "mpm_prefork"
|
a2setModule 1 "mpm_prefork"
|
||||||
|
|
|
@ -2,6 +2,17 @@
|
||||||
# @app pluie/alpine-apache
|
# @app pluie/alpine-apache
|
||||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
|
if [ ! -d /app/$WWW_DIR ]; then
|
||||||
|
CREATE_WWW_DIR=1
|
||||||
|
mkdir -p /app/$WWW_DIR
|
||||||
|
fi
|
||||||
|
if [ ! -f /app/$WWW_DIR/$WWW_INDEX ]; then
|
||||||
|
echo "<?php phpinfo();" > /app/$WWW_DIR/$WWW_INDEX
|
||||||
|
fi
|
||||||
|
tmpsed='s#^DocumentRoot ".*#DocumentRoot "/app/'$WWW_DIR'"#g'
|
||||||
|
sed -i "$tmpsed" /etc/apache2/httpd.conf
|
||||||
|
sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf
|
||||||
|
|
||||||
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
if [ ! -z "$FIX_OWNERSHIP" ] && [ "$FIX_OWNERSHIP" -eq 1 ] && [ -d /app/$WWW_DIR ]; then
|
||||||
chown -R 1000:apache /app/$WWW_DIR
|
chown -R 1000:apache /app/$WWW_DIR
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -6,7 +6,7 @@ if [ ! -z "/app/vhost" ]; then
|
||||||
cat <<EOF > "/app/vhost"
|
cat <<EOF > "/app/vhost"
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName $HTTP_SERVER_NAME
|
ServerName $HTTP_SERVER_NAME
|
||||||
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
|
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=\$1
|
||||||
<Directory /app/$WWW_DIR>
|
<Directory /app/$WWW_DIR>
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
||||||
# @app pluie/alpine-symfony
|
# @app pluie/alpine-symfony
|
||||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
if [ ! -d /app/$WWW_DIR ]; then
|
if [ -z "$CREATE_WWW_DIR" ]; then
|
||||||
cd /tmp
|
cd /tmp
|
||||||
mkdir $WWW_DIR
|
mkdir $WWW_DIR
|
||||||
symfony new app $SYMFONY_VERSION
|
symfony new app $SYMFONY_VERSION
|
||||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
||||||
# @app pluie/alpine-symfony
|
# @app pluie/alpine-symfony
|
||||||
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
||||||
|
|
||||||
if [ ! -d /app/$WWW_DIR ]; then
|
if [ -z "$CREATE_WWW_DIR" ]; then
|
||||||
cd /tmp
|
cd /tmp
|
||||||
ls -la /tmp
|
ls -la /tmp
|
||||||
mkdir $WWW_DIR
|
mkdir $WWW_DIR
|
||||||
|
|
Loading…
Reference in New Issue
Block a user