node.js and apache

Has anyone been able to get this work properly?

I've tried so many things. ProxyPass is my latest attempt.

Activated

a2enmod proxy

a2enmod proxy_http

a2enmod vhost_alias

Tried this tutorial (without the nginx) to install node (which I think works)

https://www.linode.com/docs/websites/no … -on-debian">https://www.linode.com/docs/websites/nodejs/how-to-install-nodejs-and-nginx-on-debian

edited /etc/apache2/apache2.conf

to include:

ProxyPass /DIRECTORY http://localhost:3000/

LoadModule proxymodule modules/modproxy.so

LoadModule proxyhttpmodule modules/modproxyhttp.so

opened up port 3000 on the firewall.

Visiting the test js script I get the actual js output

visiting the test js script and placing port :300 in the url I get

Error: ENOENT, 'open '/var/www/hello.js:3000'

Any help is greatly appreciated. Thank you.

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct