You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in process of making my first reflex app into production mode and put it on my VPS running nginx.
So far after spending hours, no joy and and I cannot get the app running.
I am running "reflex run --env prod" , which creates listeners on 3000 (frontend) and 8000 (backend),.
I have added a "api_url="http://codemydomain,com:8000", in rx.config. and I have exposed port 8000 on server directly without nginx.
Problem is when I access the https://codemydomain.com , the page is not rendering properly and I found that the browser is not connecting to the backend (http://codemydomain,com:8000) , I foundout running wireshark on my laptop.
However if I access the forntend directly without Nginx proxy (http://codemydomain,com:3000) , it works perfectly fine and I can see some request to port 8000 as well.
My question is what is the correct way to host Reflex in prod behind the Nginx?
Should I run reflex and allow it to serve on port 3000 ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Everyone
I'm in process of making my first reflex app into production mode and put it on my VPS running nginx.
So far after spending hours, no joy and and I cannot get the app running.
I am running "reflex run --env prod" , which creates listeners on 3000 (frontend) and 8000 (backend),.
I have added a "api_url="http://codemydomain,com:8000", in rx.config. and I have exposed port 8000 on server directly without nginx.
I have created a reverse proxy on nginx to route https://codemydomain.com -> http://127.0.0.1:3000 for frontend.
Problem is when I access the https://codemydomain.com , the page is not rendering properly and I found that the browser is not connecting to the backend (http://codemydomain,com:8000) , I foundout running wireshark on my laptop.
However if I access the forntend directly without Nginx proxy (http://codemydomain,com:3000) , it works perfectly fine and I can see some request to port 8000 as well.
My question is what is the correct way to host Reflex in prod behind the Nginx?
Should I run reflex and allow it to serve on port 3000 ?
Thanks
Reza Toghraee
Beta Was this translation helpful? Give feedback.
All reactions