Hello and Welcome to LinuxQuestions,
If you have your firewall/router set up in a way that all webtraffic gets forwarded to the Squid server, then you can set up Squid as a reverse proxy to redirect traffic on domain name base. I've set it up with a lot of subdomains that way. Below is a part of my squid.conf for reference. Confidential information is 'changed'
Code:
cache_mgr root
#debug_options 61,3 ALL,9
# Basic parameters
visible_hostname www.domain.com
auth_param basic realm Domain Security Portal
error_directory /usr/share/squid3/errors/English
# This line indicates the server we will be proxying for
#
http_port 192.168.253.20:80 defaultsite=www.domain.com vhost
https_port 192.168.253.20:443 accel cert=/etc/ssl/domain.crt key=/etc/ssl/domain.key defaultsite=www.domain.com vhost protocol=https
forwarded_for on
# And the IP Address for it - adjust the IP and port if necessary
cache_peer 172.X.X.X parent 443 0 no-query originserver ssl sslversion=3 sslflags=DONT_VERIFY_PEER front-end-https=on name=aut
acl site_aut dstdomain aut.domain.com
cache_peer_access aut allow site_aut
acl https proto https
cache_peer 172.X.X.X parent 443 0 no-query originserver ssl sslversion=3 sslflags=DONT_VERIFY_PEER front-end-https=on name=autlog
acl site_autlog dstdomain autlog.domain.com
cache_peer_access autlog allow site_autlog
acl https proto https
cache_peer 172.X.X.X parent 7002 0 no-query originserver ssl sslflags=DONT_VERIFY_PEER front-end-https=on name=auti2
acl site_auti2 dstdomain auti2.domain.com
cache_peer_access auti2 allow site_auti2
acl https proto https
cache_peer 172.X.X.X parent 443 0 no-query originserver ssl sslversion=3 sslflags=DONT_VERIFY_PEER front-end-https=on name=testfinance
acl site_testfinance dstdomain testfinance.domain.com
cache_peer_access testfinance allow site_testfinance
acl https proto https
cache_peer 172.X.X.X parent 443 0 no-query originserver ssl sslversion=3 sslflags=DONT_VERIFY_PEER front-end-https=on name=testmat
acl site_testmat dstdomain testmat.domain.com
cache_peer_access testmat allow site_testmat
acl https proto https
cache_peer 172.X.X.X parent 7002 0 no-query originserver ssl sslversion=3 sslflags=DONT_VERIFY_PEER front-end-https=on name=testmati2
acl site_testmati2 dstdomain testmati2.domain.com
cache_peer_access testmati2 allow site_testmati2
acl https proto https
This is only a part just to indicate how I configured the subdomains and the destination servers for them. It doesn't include any ACLs or access rules. All peers use https with a wildcard certificate.
Hope it helps. Looking forward to your participation in the forums. Have fun with Linux.
Kind regards,
Eric