Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

321
Views
Routes are not working after publishing my React Web App to Apache production server

I was execute this command:

$ npm run-script build

The initial page works well, but any link with routes (for example "login") doesn't work.

How I can change the script "build" or correct that?

Any ideas?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This is probably not a problem with your build.

I guess you are using React Routers BrowserRouter? If so, your React Application is handling the routing. That means that your Apache config has to be configured to always respond with your builds index.html for whatever url is requested.

Check out this example config: https://gist.github.com/alexsasharegan/173878f9d67055bfef63449fa7136042

Hope that helps

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!