Skip to content

Instantly share code, notes, and snippets.

@fduran
Created December 12, 2012 21:52
Show Gist options
  • Save fduran/4271967 to your computer and use it in GitHub Desktop.
Save fduran/4271967 to your computer and use it in GitHub Desktop.
Apache Redirect Subdomain to port
# www.fduran.com
# redirect from apache port (:8080 for ex for tomcat etc) to subdomain
# in apache config:
<VirtualHost *:80>
ServerName subdomain.example.com
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>
@Hongdeshuai
Copy link

Works very well.
Can I redirect only on certain domains, not redirecting all requests coming into 80 port?

@iamsubrataaich
Copy link

Works like a charm. Thank you.

@gvillalobos6
Copy link

thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment