Hello.
I have searched threads and couldn't find my question answered.
It's like this : I would like to have multiple websites with just one port open, and I know one can employ virtual hosts but I don't want to point to directories, but other servers running on localhost. So, if I have mldonkey serving on local port 6060 and SABnzbd on port 7221, I would like to have :
mldonkey.my_site.com -> redirects to -> localhost:6060
sabnzbd.my_site.com -> redirects to -> localhost:7221
www.my_site.com -> normal website
I have found something similar, but this is to have Apache redirect content from a specific port (443) :
Code:
<~VirtualHost myhostname:443>
~RewriteEngine on
~RewriteRule /mldonkey/(.*) ~http://admin@myhostname:4080/$1 ~[[P,L]]
~RewriteRule /mldonkey/(submit.*) ~http://admin@myhostname:4080/$1 ~[[P,L]]
~RewriteRule /mldonkey/(files.*) ~http://admin@myhostname:4080/$1 ~[[P,L]]
~ProxyPassReverse /mldonkey/(.*) ~http://myhostname:4080/$1
<Location /mldonkey/>
Order allow,deny
Allow from all
~AuthType Basic
~AuthName \"MLDonkey\"
~AuthUserFile /etc/apache2/keys.dat
Require valid-user
</Location>
Is there a way to make this redirect work based on subdomain name?
Please help, and thanks in advance!