diff options
author | 2022-12-15 06:47:48 +0000 | |
---|---|---|
committer | 2022-12-15 07:47:48 +0100 | |
commit | bae73982f7e1a3cfde63ea681a66d8f420b5038f (patch) | |
tree | bb2116616ca78fc2cff48800b2dafa26e65c0e83 | |
parent | [chore] Add svg version of sloth logo as logo.svg (#1265) (diff) | |
download | gotosocial-bae73982f7e1a3cfde63ea681a66d8f420b5038f.tar.xz |
[docs] Update Apache docs to use 127.0.0.1 instead of localhost (#1266)
* Update Apache docs to use 127.0.0.1 instead
* Update apache-httpd.md
-rw-r--r-- | docs/installation_guide/apache-httpd.md | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/docs/installation_guide/apache-httpd.md b/docs/installation_guide/apache-httpd.md index acada7c6f..b51b45a9b 100644 --- a/docs/installation_guide/apache-httpd.md +++ b/docs/installation_guide/apache-httpd.md @@ -83,12 +83,14 @@ MDCertificateAgreement accepted RewriteEngine On RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] - RewriteRule ^/?(.*) "ws://localhost:8080/$1" [P,L] + # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758 + RewriteRule ^/?(.*) "ws://127.0.0.1:8080/$1" [P,L] SSLEngine On ProxyPreserveHost On - ProxyPass / http://localhost:8080/ - ProxyPassReverse / http://localhost:8080/ + # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758 + ProxyPass / http://127.0.0.1:8080/ + ProxyPassReverse / http://127.0.0.1:8080/ RequestHeader set "X-Forwarded-Proto" expr=https </VirtualHost> @@ -96,7 +98,7 @@ MDCertificateAgreement accepted Again, replace occurrences of `example.com` in the above config file with the hostname of your GtS server. If your domain name is `gotosocial.example.com`, then `gotosocial.example.com` would be the correct value. -You should also change `http://localhost:8080` to the correct address and port of your GtS server. For example, if you're running GoToSocial on another machine with the local ip of `192.168.178.69` and on port `8080` then `http://192.168.178.69:8080/` would be the correct value. +You should also change `http://127.0.0.1:8080` to the correct address and port (if it's not on `127.0.0.1:8080`) of your GtS server. For example, if you're running GoToSocial on another machine with the local ip of `192.168.178.69` and on port `8080` then `http://192.168.178.69:8080/` would be the correct value. `Rewrite*` directives are needed to ensure that Websocket streaming connections also work. See the [websocket](./websocket.md) document for more information on this. @@ -166,18 +168,20 @@ The file you're about to create should look initially for both 80 (required) and RewriteEngine On RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] - RewriteRule ^/?(.*) "ws://localhost:8080/$1" [P,L] + # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758 + RewriteRule ^/?(.*) "ws://127.0.0.1:8080/$1" [P,L] ProxyPreserveHost On - ProxyPass / http://localhost:8080/ - ProxyPassReverse / http://localhost:8080/ + # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758 + ProxyPass / http://127.0.0.1:8080/ + ProxyPassReverse / http://127.0.0.1:8080/ </VirtualHost> ``` Again, replace occurrences of `example.com` in the above config file with the hostname of your GtS server. If your domain name is `gotosocial.example.com`, then `gotosocial.example.com` would be the correct value. -You should also change `http://localhost:8080` to the correct address and port of your GtS server. For example, if you're running GoToSocial on another machine with the local ip of `192.168.178.69` and on port `8080` then `http://192.168.178.69:8080/` would be the correct value. +You should also change `http://127.0.0.1:8080` to the correct address and port (if it's not on `127.0.0.1:8080`) of your GtS server. For example, if you're running GoToSocial on another machine with the local ip of `192.168.178.69` and on port `8080` then `http://192.168.178.69:8080/` would be the correct value. `Rewrite*` directives are needed to ensure that Websocket streaming connections also work. See the [websocket](./websocket.md) document for more information on this. |