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.
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.
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
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?