#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { # Path to source alias __INSTALL_DIR__/live/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; # Proxy if requested file not found try_files $uri @diaspora; location __PATH__/assets/ { expires max; more_set_headers 'Cache-Control: public'; } # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; } 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://unix:/run/__NAME__/diaspora.sock; }