1

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.

1 Answer 1

1

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 + Apache. 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.

Sign up to request clarification or add additional context in comments.

1 Comment

Your welcome. Always try to format your Q&A they way others can easily read them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.