server { root /jails/diaspora/usr/home/diaspora/diaspora/public/; # Configure maximum picture size # Note that Diaspora has a client side check set at 4M client_max_body_size 5M; client_body_buffer_size 256K; ssl_certificate /usr/local/etc/letsencrypt/live/diaspora.lapinbilly.eu/fullchain.pem; ssl_certificate_key /usr/local/etc/letsencrypt/live/diaspora.lapinbilly.eu/privkey.pem; # Proxy if requested file not found try_files $uri @diaspora; location /assets/ { expires max; add_header Cache-Control public; } # Camo support #location /camo/ { # proxy_redirect off; # proxy_pass http://camo/; # break; #} location @diaspora { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://diaspora_server; } } upstream diaspora_server { server unix:/jails/diaspora/usr/home/diaspora/diaspora/tmp/diaspora.sock; }