Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I am getting an “Invalid Host header” message, when running instaclone app on www.niuozbi.com #5

Closed
TimchaStudio opened this issue Aug 16, 2020 · 2 comments

Comments

@TimchaStudio
Copy link

TimchaStudio commented Aug 16, 2020

Installation problem
There is “Invalid Host Header” error?
the problem may be related to some firewall settings for your server?

I checked the firewall. It's not its problem.

However what I've gathered from stackoverflow, it seems that the problem may be related to webpack-dev-server adds a host check. (refer link).


How did you configure the sample website to remove port 3000?

@Sandermoen
Copy link
Owner

I should probably mention that if you intend to run the website in a production environment you do not use the webpack dev server. You have to build the static files and serve them using a webserver. The backend is already configured to serve the static files, all you have to do is run npm run build and start the backend with npm start making sure that the NODE_ENV is in production.

@TimchaStudio
Copy link
Author

@Sandermoen thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants