Page 1 of 1
Port Redirection for Domain
Posted: Wed Apr 20, 2016 8:44 pm
by wcannon
How can I redirect HTTP requests for ports other than 80 (e.g., 8080, 8000, etc.) to the Apache Web server on my machine and leave port 80 on the Sonic-hosted server?
For example, I would like
http://mydomain:80/ to be served by Sonic, but
http://mydomain:8080, etc., to be redirected to my machine's Web server.
Re: Port Redirection for Domain
Posted: Wed Apr 20, 2016 8:49 pm
by wcannon
Purpose: I would like to host JIRA, Confluence, etc., under my Sonic-hosted domain name, but they require support not available on Sonic (to the best of my knowledge). I currently access them at ports 8080 and 8081, for example.
Re: Port Redirection for Domain
Posted: Thu Apr 21, 2016 12:32 pm
by drew.phillips
JIRA and Confluence are Java based products which is not supported on our hosting platform. They also run their own web server which would require binding to a custom port.
Redirecting a port is not supported on basic or value hosting, you'd need a dedicated server and IP to be able to do something like that. Apache's mod_proxy allows for proxying a path like "/jira" to your other server, but we don't run the proxy module on the custweb either.
I would recommend setting up a CNAME or creating an A record to point a subdomain to your other server. This way you can have something like jira.mydomain.com pointing to the IP of your machine's web server. You can easily set these up using the DNS manager in member tools.
I hope this solution works for you. Let me know if you have any questions.
Re: Port Redirection for Domain (sub-domain and CNAME)
Posted: Thu Apr 21, 2016 1:12 pm
by wcannon
Drew,
Thanks for the pointer re setting up a CNAME. Redirecting a sub-domain will work just fine instead of a different port number.
My expectation was to host JIRA and Confluence on my machine. I just wanted users to be able to access them via my domain name.
--Wayne
Re: Port Redirection for Domain
Posted: Thu Apr 21, 2016 1:18 pm
by drew.phillips
Excellent, I'm happy to hear that will be satisfactory for you.
I think a subdomain is easier for people to remember and type, especially since a port number in a web address is a foreign concept to many, and it looks cleaner.
Glad to be of assistance!
Re: Port Redirection for Domain
Posted: Thu Apr 21, 2016 2:44 pm
by wcannon
Drew,
Can the CNAME redirection hostname include a port number, e.g., myPersonalHost.com:8080?
--Wayne
Re: Port Redirection for Domain
Posted: Thu Apr 21, 2016 2:54 pm
by drew.phillips
Not on the CNAME record itself. You will set up a CNAME for the subdomain pointing to the actual host (without the port number).
The CNAME record in member tools should look like:
jira.mydomain.com 7200 CNAME mypersonalhost.com
You can then link to jira.mydomain.com:8080 which will translate to mypersonalhost.com:8080
If port 80 is free on your public IP, you can set up NAT rules to forward external port 80 to your internal address on port 8080.
Re: Port Redirection for Domain
Posted: Thu Apr 21, 2016 9:21 pm
by wcannon
Thanks.