About this tool
Reverse proxy to an app on :3000 with SPA fallback and gzip.
Ready-to-use nginx.conf — view the content, copy it, or download it with the correct filename. Free and 100% in your browser.
Reverse proxy to an app on :3000 with SPA fallback and gzip.
server {
listen 80;
server_name example.com;
root /var/www/html;
index index.html;
gzip on;
gzip_types text/css application/javascript application/json image/svg+xml;
# Serve static, fall back to index.html (SPA)
location / {
try_files $uri $uri/ /index.html;
}
# Proxy API to the app server
location /api/ {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Reverse proxy to an app on :3000 with SPA fallback and gzip.
Ready-to-use nginx.conf — view the content, copy it, or download it with the correct filename. Free and 100% in your browser.