summaryrefslogtreecommitdiff
path: root/docs/installation_guide/nginx.md
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-12-14 16:07:03 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-14 16:07:03 +0100
commit418bfbf494504228111db20c3439d8bf80ad0c5a (patch)
tree81da6d6124761046c8d0adf21792971fa51dcd71 /docs/installation_guide/nginx.md
parent[feature] support Sec-Websocket-Protocol in streaming API (#1254) (diff)
downloadgotosocial-418bfbf494504228111db20c3439d8bf80ad0c5a.tar.xz
[docs] Update nginx docs to use 127.0.0.1 instead of localhost (#1264)
Lots of these were appearing: ``` *459 connect() failed (111: Connection refused) while connecting to upstream ``` This change resolves it, see https://stackoverflow.com/a/52550758
Diffstat (limited to 'docs/installation_guide/nginx.md')
-rw-r--r--docs/installation_guide/nginx.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/installation_guide/nginx.md b/docs/installation_guide/nginx.md
index 434eeadcf..bbf12b050 100644
--- a/docs/installation_guide/nginx.md
+++ b/docs/installation_guide/nginx.md
@@ -63,7 +63,8 @@ server {
listen [::]:80;
server_name example.org;
location / {
- proxy_pass http://localhost:8080;
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
@@ -74,7 +75,7 @@ server {
}
```
-Change `proxy_pass` to the ip and port that you're actually serving GoToSocial on and change `server_name` to your own domain name.
+Change `proxy_pass` to the ip and port that you're actually serving GoToSocial on (if it's not on `127.0.0.1:8080`), and change `server_name` to your own domain name.
If your domain name is `example.org` then `server_name example.org;` would be the correct value.
@@ -152,7 +153,8 @@ If you open the NGINX config again, you'll see that Certbot added some extra lin
server {
server_name example.org;
location / {
- proxy_pass http://localhost:8080/;
+ # set to 127.0.0.1 instead of localhost to work around https://stackoverflow.com/a/52550758
+ proxy_pass http://127.0.0.1:8080/;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";