Why is my index.html from my React project not loading on Plesk?

  Kiến thức lập trình

I am using Plesk Obsidian to host a static React app made with create-react-app, not using React Router. The site works when I do npm run build and upload the files in the build folder to httpdocs. However, it doesn’t work when I use the Git option to upload files – currently displays a blank page. In the console tab of developer tools, no errors or messages appear. In the network tab, it seems like most of the resources load EXCEPT index.html is absent.
In the Node.js options, I have options set like this:
Document Root: /httpdocs/public
Application Mode: production
Application Root: /httpdocs
Application Startup File: public/index.html

Using the Plesk file explorer, index.html is located at /httpdocs/public/index.html and is not blank.

I am not particularly familiar with Plesk, any suggestions would be much appreciated. Thanks!

I have changed the node.js options to different document and application roots, changed the index.html file root, tried deleting _redirects file (which contains /* /index.html 200), but to no avail. Restarted the application, removed and re-added the repo on Plesk, refreshed and everything.
I also had issues earlier with the homepage being the github pages url instead of my new domain since I deployed there first, and I changed homepage to “.” . Not sure if any other configuration for github pages deployment might be affecting my issue.

New contributor

Sunny is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT