diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-09-22 21:42:10 +0300 | 
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-09-22 21:42:10 +0300 | 
| commit | 72d2b34d3bf47705ad5298f2ce2c6bf48a0a8e82 (patch) | |
| tree | df79362a63e25b87c492c8568e52c029a7ee7542 /installation | |
| parent | 489a107cf449a10c7f6ac9a4b8d4a7f9f7314c5c (diff) | |
| parent | 02f12ec6253093d8bedaf84d78d0f7e533745e1b (diff) | |
| download | pleroma-72d2b34d3bf47705ad5298f2ce2c6bf48a0a8e82.tar.gz pleroma-72d2b34d3bf47705ad5298f2ce2c6bf48a0a8e82.zip | |
Merge branch 'develop' into issue/1975
Diffstat (limited to 'installation')
| -rw-r--r-- | installation/pleroma.nginx | 33 | 
1 files changed, 20 insertions, 13 deletions
| diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index d301ca615..d613befd2 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; @@ -63,19 +69,16 @@ server {      # the nginx default is 1m, not enough for large media uploads      client_max_body_size 16m; +    ignore_invalid_headers off; -    location / { -        proxy_http_version 1.1; -        proxy_set_header Upgrade $http_upgrade; -        proxy_set_header Connection "upgrade"; -        proxy_set_header Host $http_host; -        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - -        # 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_http_version 1.1; +    proxy_set_header Upgrade $http_upgrade; +    proxy_set_header Connection "upgrade"; +    proxy_set_header Host $http_host; +    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -        client_max_body_size 16m; +    location / { +        proxy_pass http://phoenix;      }      location ~ ^/(media|proxy) { @@ -83,12 +86,16 @@ server {          slice              1m;          proxy_cache_key    $host$uri$is_args$args$slice_range;          proxy_set_header   Range $slice_range; -        proxy_http_version 1.1;          proxy_cache_valid  200 206 301 304 1h;          proxy_cache_lock   on;          proxy_ignore_client_abort on;          proxy_buffering    on;          chunked_transfer_encoding on; -        proxy_pass         http://127.0.0.1:4000; +        proxy_pass         http://phoenix; +    } + +    location /api/fedsocket/v1 { +        proxy_request_buffering off; +        proxy_pass http://phoenix/api/fedsocket/v1;      }  } | 
