Über dieses Tool
Reverse-Proxy zu einer App auf :3000 mit SPA-Fallback und gzip.
Sofort einsatzbereites nginx.conf — Inhalt ansehen, kopieren oder mit korrektem Dateinamen herunterladen. Kostenlos und 100 % im Browser.
Reverse-Proxy zu einer App auf :3000 mit SPA-Fallback und 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 zu einer App auf :3000 mit SPA-Fallback und gzip.
Sofort einsatzbereites nginx.conf — Inhalt ansehen, kopieren oder mit korrektem Dateinamen herunterladen. Kostenlos und 100 % im Browser.