# Linkbox. Awesome URL shortening and file dumping server { listen 80; server_name link.joram.io; location /.well-known/acme-challenge/ { alias /srv/http/acme-challenge/; try_files $uri =404; } location / { return 301 https://$server_name$request_uri; } } server { listen 443 ssl; server_name link.joram.io; root /srv/http/link.joram.io; client_max_body_size 8m; default_type text/plain; location /.well-known/acme-challenge/ { alias /srv/http/acme-challenge/; try_files $uri =404; } location / { try_files $uri @proxy; } location @proxy { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:5002; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }