Say I have basic PHP site installed at http://example.com. Then, at http://example.com/groovy, we have an express.js app running on Node.
I have the app running on the default express port of :3000. I would expect then to visit http://example.com/groovy:3000 and see the same webpage found at http://localhost/groovy:3000. However, this is not the case.
Instead I am only able to access the /groovy site by going to http://example.com:3000. This entirely disregards the subdirectory.
I anticipate part of the setting has to do with the Apache httpd.conf file. Since I don't know exactly, my best bets are guess and check (very inefficient).
Here is the current setup:
<VirtualHost *:80>
Servername example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com
</VirtualHost>
^ This delivers the regular PHP site. Then going to /groovy should deliver the Node/express.js site.
Further, I have not found yet the proper way to not require a port number in the URL. I want to be able to go to http://example.com/groovy and be delivered the express.js content.
I tried setting some rewrite rules in the base URL .htaccess, like this
RewriteEngine On
RewriteRule groovy http://example.com:3000
But this hasn't worked out yet. Any other suggestions?