http{ server { server_name domain.com; location = /minimun { return 301 https://$server_name/minimun } location = /minimun/ { root /home/minimun/minimun/www/; try_files /index.html =404; } location /minimun { gzip off; include uwsgi_params; uwsgi_modifier1 9; uwsgi_pass unix:/run/uwsgi/minimun.sock } } }