mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-31 02:52:19 +08:00
fix the reported gateway problem
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
6d0a68abf3
commit
bb36f7e22c
1 changed files with 6 additions and 3 deletions
|
@ -141,15 +141,18 @@ chown root:root -R /mnt/docker-aio-config/certs/
|
||||||
# Probably more cosmetic than anything but at least an attempt
|
# Probably more cosmetic than anything but at least an attempt
|
||||||
if ! grep -q '# nextcloud-aio-block' /etc/apache2/apache2.conf; then
|
if ! grep -q '# nextcloud-aio-block' /etc/apache2/apache2.conf; then
|
||||||
if ! NETWORK_GATEWAY="$(docker inspect nextcloud-aio-mastercontainer --format "{{.NetworkSettings.Gateway}}")" || [ -z "$NETWORK_GATEWAY" ]; then
|
if ! NETWORK_GATEWAY="$(docker inspect nextcloud-aio-mastercontainer --format "{{.NetworkSettings.Gateway}}")" || [ -z "$NETWORK_GATEWAY" ]; then
|
||||||
echo "Could not get the gateway of the mastercontainer. Cannot continue."
|
echo "Could not get the gateway of the mastercontainer."
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
cat << APACHE_CONF >> /etc/apache2/apache2.conf
|
cat << APACHE_CONF >> /etc/apache2/apache2.conf
|
||||||
# nextcloud-aio-block-start
|
# nextcloud-aio-block-start
|
||||||
<Location />
|
<Location />
|
||||||
order allow,deny
|
order allow,deny
|
||||||
deny from nextcloud-aio-nextcloud.nextcloud-aio
|
deny from nextcloud-aio-nextcloud.nextcloud-aio
|
||||||
deny from $NETWORK_GATEWAY
|
APACHE_CONF
|
||||||
|
if [ -n "$NETWORK_GATEWAY" ]; then
|
||||||
|
echo "deny from $NETWORK_GATEWAY" >> /etc/apache2/apache2.conf
|
||||||
|
fi
|
||||||
|
cat << APACHE_CONF >> /etc/apache2/apache2.conf
|
||||||
allow from all
|
allow from all
|
||||||
</Location>
|
</Location>
|
||||||
# nextcloud-aio-block-end
|
# nextcloud-aio-block-end
|
||||||
|
|
Loading…
Reference in a new issue