[documentation] add ipv6 config for nginx (#367)

This commit is contained in:
tobi 2022-01-30 14:35:23 +01:00 committed by GitHub
parent 14c472c1ab
commit ec4357485e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,6 +59,7 @@ The file you're about to create should look a bit like this:
```nginx.conf
server {
listen 80;
listen [::]:80;
server_name example.com;
location / {
proxy_pass http://localhost:8080;
@ -67,6 +68,8 @@ server {
}
```
Note: You can remove the line `listen [::]:80;` if your server is not ipv6 capable or you'd rather not use ipv6.
Change `proxy_pass` to the ip and port that you're actually serving GoToSocial on and change `server_name` to your own domain name.
If your domain name is `gotosocial.example.com` then `server_name gotosocial.example.com;` would be the correct value.
If you're running GoToSocial on another machine with the local ip of 192.168.178.69 and on port 8080 then `proxy_pass http://192.168.178.69:8080;` would be the correct value.
@ -86,7 +89,7 @@ sudo nginx -t
If everything is fine you should get this as output:
```
```text
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
```