X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=installation%2Fpleroma.nginx;h=9890cb2b1965e5550dfa8b81610c26e55aebdcbe;hb=bd853199d93e03fedf43397455939c6d633fa36b;hp=5517e3fc39ea3a74874d6cf722d440c145dd7866;hpb=ade7fede7134d0e05c91ef48d52e48e64fd6dd98;p=akkoma diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index 5517e3fc3..9890cb2b1 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -9,6 +9,12 @@ proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g inactive=720m use_temp_path=off; +# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only +# and `localhost.` resolves to [::0] on some systems: see issue #930 +upstream phoenix { + server 127.0.0.1:4000 max_fails=5 fail_timeout=60s; +} + server { server_name example.tld; @@ -72,9 +78,7 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; location / { - # this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only - # and `localhost.` resolves to [::0] on some systems: see issue #930 - proxy_pass http://127.0.0.1:4000; + proxy_pass http://phoenix; } location ~ ^/(media|proxy) { @@ -87,11 +91,6 @@ server { proxy_ignore_client_abort on; proxy_buffering on; chunked_transfer_encoding on; - proxy_pass http://127.0.0.1:4000; - } - - location /api/fedsocket/v1 { - proxy_request_buffering off; - proxy_pass http://127.0.0.1:4000/api/fedsocket/v1; + proxy_pass http://phoenix; } }