← 모든 코드 파일

nginx.conf

:3000 앱으로의 리버스 프록시, SPA 폴백과 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;
    }
}

이 도구에 대해

:3000 앱으로의 리버스 프록시, SPA 폴백과 gzip 포함.

바로 사용할 수 있는 nginx.conf — 내용을 보고 복사하거나 올바른 파일명으로 다운로드하세요. 무료, 100% 브라우저에서.