简体   繁体   中英

setting up a MEAN app in production

I am a frontend developer and having issues setting up my MEAN app in production server. I am confused about the role of apache ? if any.

right now I don't have a domain name, just an IP address for a CentOS 6 VPS.

I stopped apache and am using express only, I deployed the app code and ran the grunt task in production environment and the app is listening on port 3000 .. but when I visit the site at http://104.238.103.223:3000/ I get a "page not available" error

I am confused at how to specify a "DocumentRoot" without apache ? how do I tell DNS where to find my app ? I may be looking at the problem wrong since I am not well aware of the backend side of things.

You should reverse proxy to port 80 (or 443 for https) to access your application with your domain name. You can use apache, nginx or haproxy etc.

Also check your firewall if port 3000 is allowed.

Check out this page; http://blog.podrezo.com/making-node-js-work-with-apache/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM