I have some subdomains I want to redirect to specific ports on the same server. Say I have
dev.mydomain.com
I want dev.mydomain.com to transparently redirect to mydomain.com:8080 and I want to preserve the original sub-domain name the url of the browser.
How do I do this with Apache 2.2? I have Apache 2.2 running on default port 80. I can't figure out the write configuration to get this to happen.
I have already set up dev.mydomain.com to resolve in DNS to mydomain.com.
This is for an intranet development server that has a non-routable ip address so I am not so concerned about exploits and security that would compromise a publicly facing server.
mod_proxyas well asproxy_http. – matewka Nov 20 '15 at 19:47nginx? – rosefun Dec 01 '20 at 14:41/etc/apache2/extra/httpd-vhosts.conf. Myhttpd.confwasn't looking at this vhosts file by default. I had to add my new conf to/private/etc/apache2/other(ref). Everything else above worked as is. – NP01 Jul 05 '21 at 00:07