# # Nginx conf for laclasse etherpad # map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; server_name etherpad; error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html/; } # Relocate root url location /pads/ { rewrite /pads/?(.+) /$1 break; proxy_pass http://localhost:9001/; proxy_redirect / /pads/; proxy_buffering off; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } client_max_body_size 200m; }