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`.
This commit is contained in:
parent
c79a3e35af
commit
9a251e4e46
@ -10,7 +10,7 @@
|
|||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
ProxyVia On
|
ProxyVia On
|
||||||
ProxyPass http://localhost:2402/.well-known/acme-challenge
|
ProxyPass http://127.0.0.1:2402/.well-known/acme-challenge
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
Redirect permanent / https://riot.DOMAIN/
|
Redirect permanent / https://riot.DOMAIN/
|
||||||
@ -33,8 +33,8 @@
|
|||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
ProxyVia On
|
ProxyVia On
|
||||||
|
|
||||||
ProxyPass / http://localhost:8765/
|
ProxyPass / http://127.0.0.1:8765/
|
||||||
ProxyPassReverse / http://localhost:8765/
|
ProxyPassReverse / http://127.0.0.1:8765/
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/riot.DOMAIN-error.log
|
ErrorLog ${APACHE_LOG_DIR}/riot.DOMAIN-error.log
|
||||||
CustomLog ${APACHE_LOG_DIR}/riot.DOMAIN-access.log combined
|
CustomLog ${APACHE_LOG_DIR}/riot.DOMAIN-access.log combined
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyRequests Off
|
ProxyRequests Off
|
||||||
ProxyVia On
|
ProxyVia On
|
||||||
ProxyPass http://localhost:2402/.well-known/acme-challenge
|
ProxyPass http://127.0.0.1:2402/.well-known/acme-challenge
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
Redirect permanent / https://matrix.DOMAIN/
|
Redirect permanent / https://matrix.DOMAIN/
|
||||||
@ -38,8 +38,8 @@
|
|||||||
ProxyPassMatch ^/_matrix/client/r0/user_directory/search !
|
ProxyPassMatch ^/_matrix/client/r0/user_directory/search !
|
||||||
|
|
||||||
# Proxy all remaining traffic to Synapse
|
# Proxy all remaining traffic to Synapse
|
||||||
ProxyPass / http://localhost:8008/
|
ProxyPass / http://127.0.0.1:8008/
|
||||||
ProxyPassReverse / http://localhost:8008/
|
ProxyPassReverse / http://127.0.0.1:8008/
|
||||||
|
|
||||||
# Map /.well-known/matrix/client for client discovery
|
# Map /.well-known/matrix/client for client discovery
|
||||||
Alias /.well-known/matrix/client /matrix/static-files/.well-known/matrix/client
|
Alias /.well-known/matrix/client /matrix/static-files/.well-known/matrix/client
|
||||||
@ -60,12 +60,12 @@
|
|||||||
|
|
||||||
# Map /_matrix/identity to the identity server
|
# Map /_matrix/identity to the identity server
|
||||||
<Location /_matrix/identity>
|
<Location /_matrix/identity>
|
||||||
ProxyPass http://localhost:8090/_matrix/identity
|
ProxyPass http://127.0.0.1:8090/_matrix/identity
|
||||||
</Location>
|
</Location>
|
||||||
|
|
||||||
# Map /_matrix/client/r0/user_directory/search to the identity server
|
# Map /_matrix/client/r0/user_directory/search to the identity server
|
||||||
<Location /_matrix/client/r0/user_directory/search>
|
<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>
|
</Location>
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
|
ErrorLog ${APACHE_LOG_DIR}/matrix.DOMAIN-error.log
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# need to forward requests for `/.well-known/acme-challenge` to the certbot container.
|
# 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`
|
# 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 \
|
docker run \
|
||||||
--rm \
|
--rm \
|
||||||
|
Loading…
Reference in New Issue
Block a user