server { listen 80; server_name drop.217.182.90.36.xip.io; location /_ { alias /srv/apps/drop/files; } location / { include uwsgi_params; uwsgi_pass unix:///tmp/drop.sock; } } server { listen 80; server_name ~^(?.*)\.drop\.217\.182\.90\.36\.xip\.io$; location /_ { alias /srv/apps/drop/subdomain_files/$dir; } location / { include uwsgi_params; uwsgi_pass unix:///tmp/drop.sock; } }