If users don't set VHOST, pass ServerIP to it for fixing Docker0 NAT CORS problem #16

This commit is contained in:
diginc 2016-07-08 08:25:38 -05:00
parent 681d79fd65
commit d8b43ae9d5
3 changed files with 5 additions and 1 deletions

@ -1 +1 @@
Subproject commit d1ef51a3589a2b3b7dfa1017f2c2c6b9d97a3788
Subproject commit 246599a0ba46f2f63659ba231341b03472ecf9ea

View File

@ -13,6 +13,8 @@ echo "env[ServerIP] = ${ServerIP}" >> $PHP_ENV_CONFIG;
if [ -n "$VIRTUAL_HOST" ] ; then
echo "env[VIRTUAL_HOST] = ${VIRTUAL_HOST}" >> $PHP_ENV_CONFIG;
else
echo "env[VIRTUAL_HOST] = ${ServerIP}" >> $PHP_ENV_CONFIG;
fi;
echo "Added ENV to php:"

2
debian/start.sh vendored
View File

@ -11,6 +11,8 @@ sed -i "/bin-environment/ a\\\t\t\t\"PHP_ERROR_LOG\" => \"${PHP_ERROR_LOG}\"," $
if [ -n "$VIRTUAL_HOST" ] ; then
sed -i "/bin-environment/ a\\\t\t\t\"VIRTUAL_HOST\" => \"${VIRTUAL_HOST}\"," $PHP_ENV_CONFIG
else
echo "env[VIRTUAL_HOST] = ${ServerIP}" >> $PHP_ENV_CONFIG;
fi;
echo "Added ENV to php:"