a year ago
I can see it configured on both Railway and Cloudfare, so I'm confused as to what the problem is?
Attachments
23 Replies
a year ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 Cloudflare proxy detected , But the website is not displayed.
- 🧵 Subdomain Cloudflare Issue
- 🧵 Custom WWW Domain - Not Found Message
- 🧵 Cloudflare Proxy
If you find the answer from one of these, please let us know by solving the thread!
a year ago
Hey, can you try to remove the domain from your service, delete the CNAME record and readd your domain to your Railway service?
mardonedias
I had a similar problem, I disabled the cloud flare proxy and it worked. 
a year ago
Which one do you disable
sydneypatel
Which one do you disable
a year ago
disable the 2, domains and the www, then you can test if it works
Status changed to Awaiting User Response Railway • 12 months ago
jake
I don't see any deploys in that linked resource?
a year ago
What do you mean?
Status changed to Awaiting Railway Response Railway • 11 months ago
sydneypatel
What do you mean?
a year ago
Nevermind, I forgot to redeploy! I can see the site now thnak you !!
a year ago
I am sturggling tho when I am on a different route like website.com/about, and I reload, it says "Cannot GET /about"
a year ago
@sydneypatel you'll need to share more details about your website's deployment - e.g. is it a static site, a webapp, if a webapp, which framework, what's the build process, etc.
We can't debug HTTP issues like this without more information. Also, what is the HTTP error code you're seeing for Cannot GET /about - is it a 404, or something else?
case
@sydneypatel you'll need to share more details about your website's deployment - e.g. is it a static site, a webapp, if a webapp, which framework, what's the build process, etc. We can't debug HTTP issues like this without more information. Also, what is the HTTP error code you're seeing for `Cannot GET /about` \- is it a 404, or something else?
a year ago
- Type: Web app (SPA)
- Frontend: React + Vite (dev server on
localhost:5173) - Routing: React Router (client-side History API)
- Backend/API: Node.js + Express (e.g.,
localhost:8080) - Database: MongoDB (Mongoose)
- Dev setup: Two servers
- Vite serves the SPA and proxies API/static to the backend
- Example Vite proxy:
'/api'and'/uploads'→http://localhost:8080
- Build process:
frontend:vite build→ outputs/distbackend: plain Node/Express; in prod we serve the built SPA (or use Nginx)- custom build command: npm install --prefix frontend && npm run build --prefix frontend && npm install --prefix backend
a year ago
Does the /about view work in your local environment / server? And it's just failing in Railway? Or does it not work locally either?
a year ago
I was able to get it to work. Now I am jsut having an issue where my page contents are no longer appearing but trying to figure that out. I am thinking it may be something to do with my frontend still pointing at the Railway host
a year ago
Does your app still return a 404 when you reload a non-base path like /about or /products?
If you're serving the frontend through Express, you need to add a catch-all route
so that unknown (from the server’s perspective) routes are redirected to React Router.
I’d also recommend deploying frontend and backend as separate Railway services.
This way, you can manage them independently and avoid coupling your static build with the API.
Please, answer with more details about your deploy process, maybe i could help
pasiekak
Does your app still return a 404 when you reload a non-base path like /about or /products? If you're serving the frontend through Express, you need to add a `catch-all` route so that unknown (from the server’s perspective) routes are redirected to React Router. <https://medium.com/%40marwan.zaarab/deploying-a-react-app-with-multiple-routes-using-express-static-files-e3373c53fe94> I’d also recommend deploying frontend and backend as separate Railway services. This way, you can manage them independently and avoid coupling your static build with the API. Please, answer with more details about your deploy process, maybe i could help
a year ago
Yes I added a catch-all route. Now, I am just missing a lot of the data form those pages
a year ago
Can you share your browser devtools > network tab?
a year ago
Hey, is the domain pointing correctly?
a year ago
the website loads fine for me
irazvan2745
the website loads fine for me
a year ago
Yes the domain is poointing correctly
pasiekak
Can you share your browser devtools > network tab?
a year ago
This is the devtools for the portfolio page
Attachments
sydneypatel
This is the devtools for the portfolio page
a year ago
expanded
Attachments
sydneypatel
expanded
a year ago
I noticed you're requesting http://localhost:8080/api/portfolio and it shouldn't happen on production, change api address to correct one, maybe you just forgot to change some .env variable ;)
pasiekak
I noticed you're requesting `http://localhost:8080/api/portfolio` and it shouldn't happen on production, change api address to correct one, maybe you just forgot to change some `.env` variable ;)
a year ago
What would be a correct API variable? and wdym by changing an .env variable?? which one
thanks for your response!