简体   繁体   中英

how to run node.js on browser via linux apache server?

I installed node.js on linux server . I'm able to run node.js on command line, but not able to run on browser.

Did I clearly explained what I want?

I have a domain ram.com that point to particular location on my server /var/www/html/ram.com/ .

I created node.js pages on this location /var/www/html/ram.com .How can I access this page on browser?

My apache running on 80 port. Can you explain any changes in apache configuration?

I'm new to node.js can you explain clearly.

To use Node.js to serve your website, you just need to type node yourFileName.js in command line to start the server.

I don't really know how your pages look like. You need *.js files as Node.js source files, and Node.js work as backend. If you mean *.html , you can access them when the server program is running.

Actually, Node.js has its own built-in web server, just like PHP + Apach e. So you don't need to use Apache, and I don't think Node.js and apache can work together without other tools.

This is my first answer in Stack Overflow, hope that can help you.

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