Created
October 25, 2023 14:46
-
-
Save majudhu/6f97f4c52bfd151cd1a57a92f2c2e1cf to your computer and use it in GitHub Desktop.
Remix NGINX config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name example.com; | |
client_max_body_size 100M; # allow huge uploads, upto 100MB | |
root /home/user/example/public/; # serve static files from public dir with nginx | |
try_files $uri @remix; # serve static files with nginx, fallback to nextjs on not found | |
location /build { | |
add_header Cache-Control "public, max-age=31536000, immutable"; | |
} | |
location @remix { | |
include proxy_params; | |
proxy_pass http://127.0.0.1:3000; | |
} | |
location /admin { | |
include proxy_params; | |
proxy_pass http://127.0.0.1:3002; | |
} | |
location /api { | |
include proxy_params; | |
proxy_pass http://127.0.0.1:3002; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment