ServerName app.example.com Redirect / https://app.example.com/ ServerName app.example.com SSLEngine on DocumentRoot /path/to/repo/public Require all granted RewriteEngine on Rewritecond %{REQUEST_URI} !^/api RewriteCond %{REQUEST_URI} !^/static RewriteRule . index.html [L] ProxyPass /api unix:/run/uwsgi/app/appname/socket|uwsgi://appname/