-1

I am attempting to create a virtual host to connect a computer running a node application (Computer B 12.34.56.78) to a computer running my Apache web server (Computer A 12.34.56.77). Everything I have seen so far just deals with serving a node application running on the same computer that is running the Apache instance.

In the end I would like to be able to access the Node application using a URL such as defaultwebsite.com/nodeapp.

Has anybody had experience doing this? I am still relatively new to working with Apache and any help would be greatly appreciated.

1 Answers1

0

I guess you are looking for Reverse Proxy. It's quite simple, configure your Apache server that serves the defaultwebsite.com (Computer A, 12.34.56.77) a Reverse Proxy like this:

<Location /nodeapp>
    ProxyPass http://12.34.56.78/
    ProxyPassReverse http://12.34.56.78/
</Location>

For more, take a look at the Reverse Proxy Guide and mod_proxy configuration.

  • Would this be something that would be included in the main .conf file such as default-ssl.conf/000-default.conf? Or, could I create another .conf file called nodeApp.conf and just add those lines to it? – John Moran Jan 10 '18 at 19:59
  • I guess your default-ssl.conf/000-default.conf contains a VirtualHost. If so, put it inside the VirtualHost. – Ondřej Xicht Světlík Jan 11 '18 at 12:25