Bugfix/fix xdebug remote prefix

This commit is contained in:
Philip Z
2019-09-17 12:08:06 +00:00
committed by Ric Harvey
parent 454fcd7c07
commit defd1fddd3
2 changed files with 8 additions and 1 deletions

View File

@@ -24,6 +24,12 @@ else
webroot=/var/www/html
fi
# Enables 404 pages through php index
if [ ! -z "$PHP_CATCHALL" ]; then
sed -i 's#try_files $uri $uri/ =404;#try_files $uri $uri/ /index.php?$args;#g' /etc/nginx/sites-available/default.conf
fi
# Setup git variables
if [ ! -z "$GIT_EMAIL" ]; then
git config --global user.email "$GIT_EMAIL"
@@ -165,7 +171,7 @@ if [[ "$ENABLE_XDEBUG" == "1" ]] ; then
else
echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > $XdebugFile # Note, single arrow to overwrite file.
echo "xdebug.remote_enable=1 " >> $XdebugFile
echo "remote_host=host.docker.internal" >> $XdebugFile
echo "xdebug.remote_host=host.docker.internal" >> $XdebugFile
echo "xdebug.remote_log=/tmp/xdebug.log" >> $XdebugFile
echo "xdebug.remote_autostart=false " >> $XdebugFile # I use the xdebug chrome extension instead of using autostart
# NOTE: xdebug.remote_host is not needed here if you set an environment variable in docker-compose like so `- XDEBUG_CONFIG=remote_host=192.168.111.27`.