Pārlūkot izejas kodu

Remove some more references to localhost

Continuation of 1f0cc92b33.

As an explanation for the problem:
when saying `localhost` on the host, it sometimes gets resolved to `::1`
and sometimes to `127.0.0.1`. On the unfortunate occassions that
it gets resolved to `::1`, the container won't be able to serve the
request, because Docker containers don't have IPv6 enabled by default.

To avoid this problem, we simply prevent any lookups from happening
and explicitly use `127.0.0.1`.
pull/92/head
Slavi Pantaleev pirms 7 gadiem
vecāks
revīzija
9a251e4e46
3 mainītis faili ar 9 papildinājumiem un 9 dzēšanām
  1. +3
    -3
      examples/apache/matrix-riot-web.conf
  2. +5
    -5
      examples/apache/matrix-synapse.conf
  3. +1
    -1
      roles/matrix-nginx-proxy/templates/usr-local-bin/matrix-ssl-lets-encrypt-certificates-renew.j2

+ 3
- 3
examples/apache/matrix-riot-web.conf Parādīt failu

@@ -10,7 +10,7 @@
ProxyPreserveHost On
ProxyRequests Off
ProxyVia On
ProxyPass http://localhost:2402/.well-known/acme-challenge
ProxyPass http://127.0.0.1:2402/.well-known/acme-challenge
</Location>

Redirect permanent / https://riot.DOMAIN/
@@ -33,8 +33,8 @@
ProxyRequests Off
ProxyVia On

ProxyPass / http://localhost:8765/
ProxyPassReverse / http://localhost:8765/
ProxyPass / http://127.0.0.1:8765/
ProxyPassReverse / http://127.0.0.1:8765/

ErrorLog ${APACHE_LOG_DIR}/riot.DOMAIN-error.log
CustomLog ${APACHE_LOG_DIR}/riot.DOMAIN-access.log combined


+ 5
- 5
examples/apache/matrix-synapse.conf Parādīt failu

@@ -9,7 +9,7 @@
ProxyPreserveHost On
ProxyRequests Off
ProxyVia On
ProxyPass http://localhost:2402/.well-known/acme-challenge
ProxyPass http://127.0.0.1:2402/.well-known/acme-challenge
</Location>

Redirect permanent / https://matrix.DOMAIN/
@@ -38,8 +38,8 @@
ProxyPassMatch ^/_matrix/client/r0/user_directory/search !

# Proxy all remaining traffic to Synapse
ProxyPass / http://localhost:8008/
ProxyPassReverse / http://localhost:8008/
ProxyPass / http://127.0.0.1:8008/
ProxyPassReverse / http://127.0.0.1:8008/

# Map /.well-known/matrix/client for client discovery
Alias /.well-known/matrix/client /matrix/static-files/.well-known/matrix/client
@@ -60,12 +60,12 @@

# Map /_matrix/identity to the identity server
<Location /_matrix/identity>
ProxyPass http://localhost:8090/_matrix/identity
ProxyPass http://127.0.0.1:8090/_matrix/identity
</Location>

# Map /_matrix/client/r0/user_directory/search to the identity server
<Location /_matrix/client/r0/user_directory/search>
ProxyPass http://localhost:8090/_matrix/client/r0/user_directory/search
ProxyPass http://127.0.0.1:8090/_matrix/client/r0/user_directory/search
</Location>

ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log


+ 1
- 1
roles/matrix-nginx-proxy/templates/usr-local-bin/matrix-ssl-lets-encrypt-certificates-renew.j2 Parādīt failu

@@ -4,7 +4,7 @@
# need to forward requests for `/.well-known/acme-challenge` to the certbot container.
#
# This can happen inside the container network by proxying to `http://matrix-certbot:8080`
# or outside (on the host) by proxying to `http://localhost:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }}`.
# or outside (on the host) by proxying to `http://127.0.0.1:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }}`.

docker run \
--rm \


Notiek ielāde…
Atcelt
Saglabāt