I need your help.
I have 2 versions of the application running on the Linux machine. Version1 runs on localhost port 5000, version2 runs on localhost port 5001.
I need users to be able to access either of the application versions depending on the URL they use.
My existing Apache httpd.conf as follows:
When users type http:/my.company.com it redirects them to HTTPS port 443 and port 443 redirects to localhost 5000. This works.
<VirtualHost *:80>
ServerName my.company.com
Redirect / https://my.company.com/
</VirtualHost>
<VirtualHost *:443>
ServerName my.company.com/
TimeOut 600
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile /etc/pki/tls/certs/my.company.crt
SSLCertificateKeyFile /etc/pki/tls/private/my.company.key
</VirtualHost>
Now I need to make it when users type http://my.company.com:15000 it redirects them to some HTTPS port that redirects to localhost 5001 where my application is listening.
If there is another way to do this, like use a different domain name like my-v2.company.com it would also work. I can create a new DNS entry. The idea is that when users use a different port or a different domain it should redirect them to a different application port.
I tried searching here and tried multiple setups and cannot make it work this way.