Port Redirection for Domain

Web hosting discussion, programming, and shared and dedicated servers.
8 posts Page 1 of 1
by wcannon » Wed Apr 20, 2016 8:44 pm
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.
by wcannon » Wed Apr 20, 2016 8:49 pm
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.
by drew.phillips » Thu Apr 21, 2016 12:32 pm
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.
Drew Phillips
Programmer / System Operations, Sonic.net
by wcannon » Thu Apr 21, 2016 1:12 pm
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
by drew.phillips » Thu Apr 21, 2016 1:18 pm
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!
Drew Phillips
Programmer / System Operations, Sonic.net
by wcannon » Thu Apr 21, 2016 2:44 pm
Drew,

Can the CNAME redirection hostname include a port number, e.g., myPersonalHost.com:8080?

--Wayne
by drew.phillips » Thu Apr 21, 2016 2:54 pm
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.
Drew Phillips
Programmer / System Operations, Sonic.net
by wcannon » Thu Apr 21, 2016 9:21 pm
Thanks.
8 posts Page 1 of 1

Who is online

In total there are 121 users online :: 0 registered, 0 hidden and 121 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 121 guests