Hi there
So, I followed some guides to setup proxypass and redirect nodejs to port 8080 on one of my domains. The thing is, ultimately, we want to replace the current website (a wordpress install) with this nodejs application.
Is there anything to stop me using port 80 and having the application live in a domain?
My server, running Virtualmin GPL, does have multiple domains and multiple websites...but we are developing a website in nodejs for one particular domain. Obviously, I don't want nodejs to start responding to port 80 for everything and stop access to Apache. I am just not sure of how to proceed now.
I set it up following http://www.codingtricks.biz/run-nodejs-application-apache/
Ideally, the nodejs application could be accessed on port 80 at / instead of 8080 at /nodejsAppli
Any ideas?
Thanks
Hi, you did not say that you running apache or nginx..but process should be fairly same.. run your note app on whatever port you need to and then proxy apache to that port so when user type http.... .com he will not need to use any:portnumber. That way you can run more then one apps on non standard ports but as normal website..
I personally run my git web interface on port 3000 but proxying it out as standard website, user does not even know its running on non standard port.
Configuring/troubleshooting Debian servers is always great fun
Thanks :)
It's running on Apache configured through virtualmin. The nodejs website currently lives in /nodejsAppli on port 8080. So added the following to the virtualhost for the domain
<Location /nodejsAppli>
ProxyPass http://127.0.0.1:8080
ProxyPassReverse http://1127.0.0.1:8080
</Location>
I can't seem to get my head around how to get the app to react to 80 whilst telling it to react to 8080. I am probably just being dim. However, if I move the app to /, would changing the location block above to specify / instead of /nodejsAppli work? Wouldn't I need an index.htm that forwards to 8080? The app is the website, it's not a part of anything else. I think that is where the problem stems from, certainly in my ability to understand what the hell is happening lol.
What is the issue with just telling the app to use 80? Wouldn't it only be accessed when calling the correct domain where the app sits? Or would it take over the 80 for the entire server?
Thanks in advance for helping :)
Edit: I did not press reply eh, well try via gui first as mentioned in my reply below, that is easier option I think :)
basically if you can load app like http://domain.com:8080 or http://localhost:8080 or http://127.0.0.1:8080 you should not need to care about location of that app folder...
Configuring/troubleshooting Debian servers is always great fun
Hi, I think you have it in wrong format.. it should be like this: (remove that old code from your config first)
ProxyPass / http://127.0.0.1:8080
ProxyPassReverse / http://127.0.0.1:8080
<Proxy "*">
allow from all
</Proxy>
or perhaps easier for you to just do it here via gui:
in your case use url like http://127.0.0.1:8080 or http://localhost:8080 and it should work
Configuring/troubleshooting Debian servers is always great fun