Overclock.net banner

1 - 20 of 24 Posts

·
Premium Member
Joined
·
4,947 Posts
Discussion Starter · #1 ·
I'm trying to setup a sub-domain for my security cameras at home. I already have a domain name purchased from GoDaddy and it points to a No-IP.org domain because of my dynamic IP. The issue is that my security cameras are on port 8080 and you can't add ports to subdomains inside of GoDaddy.

An example

What I currently type: mywebsite.com:8080

What I want to type: security.mywebsite.com

The difference is I want the port, 8080, to be added automatically.

Here is what I added in godaddy:

It doesn't work, lol. I'm assuming that this is because it's DNS records and assigning ports is not valid.

What can I do here? Does anyone have any experience with this? I just want a sub-domain to point to a different port
frown.gif
 

·
Premium Member
Joined
·
4,947 Posts
Discussion Starter · #3 ·
Hmmmmmmmmmmmmmmmmmmmmmmmmmm

That's thinking outside the box!
 

·
Not New to Overclock.net
Joined
·
2,553 Posts
Quote:
Originally Posted by killabytes View Post

Hmmmmmmmmmmmmmmmmmmmmmmmmmm
That's thinking outside the box!
Lol, that's what I did to not have to deal with domain redirects.
thumb.gif
 

·
Linux Lobbyist
Joined
·
3,744 Posts
Domains point to IP addresses or are aliases for other domains. URIs are used to point to domain/IPaddress & port combinations.

So if your domain is cameras.mydomain.com and your camera is on port 6060, you'd set the domain to your external IP address/dynamic DNS name and point your browser or other software at protocol://camera.mydomain.com:6060 where protocol is http or whatever.
 
  • Rep+
Reactions: killabytes

·
Premium Member
Joined
·
4,947 Posts
Discussion Starter · #8 ·
Quote:
Originally Posted by parityboy View Post

Domains point to IP addresses or are aliases for other domains. URIs are used to point to domain/IPaddress & port combinations.
So if your domain is cameras.mydomain.com and your camera is on port 6060, you'd set the domain to your external IP address/dynamic DNS name and point your browser or other software at protocol://camera.mydomain.com:6060 where protocol is http or whatever.
Well I was trying to avoid using ports in the domain name. The issue was that I had two servers under a single DNS entry using two different ports. 80 and 8080. I wanted to type in a subdomain to go to the 8080.
 

·
Premium Member
Joined
·
14,051 Posts
Best bet would be to set up your PAT where you have port 80 externally open that forwards to your server on port 8080.

The 'http' prefix on a URL already instructs the browser to utilize port 80 unless otherwise specified, and is not a function of DNS.
 

·
Premium Member
Joined
·
4,947 Posts
Discussion Starter · #11 ·
Quote:
Originally Posted by beers View Post

Best bet would be to set up your PAT where you have port 80 externally open that forwards to your server on port 8080.
The 'http' prefix on a URL already instructs the browser to utilize port 80 unless otherwise specified, and is not a function of DNS.
Damn good idea.
 

·
Linux Lobbyist
Joined
·
3,744 Posts
@OP

I agree with Imrac, it might be best to use a URI redirector, so that an incoming request for security.mydomain.com will automatically redirect to mydomain.com:8080. Make sure that port 8080 is also port forwarded, and you should be golden.
 
  • Rep+
Reactions: killabytes

·
Premium Member
Joined
·
4,947 Posts
Discussion Starter · #13 ·
Quote:
Originally Posted by parityboy View Post

@OP
I agree with Imrac, it might be best to use a URI redirector, so that an incoming request for security.mydomain.com will automatically redirect to mydomain.com:8080. Make sure that port 8080 is also port forwarded, and you should be golden.
Well GoDaddy doesn't offer parking on sub-domains, so I can't host an HTML doc with them. But I could point the sub-domain to my server with a HTML doc that re-directs...right?
 

·
Linux Lobbyist
Joined
·
3,744 Posts
Yes, you could do that. A better way might be to set up your existing web server to handle the domain/port combination so that a call to security.mydomain.com will redirect to mydomain.com:8080; it wouldn't be an HTML document as such, the server itself would send the redirect.

Make sure that ports 80 and 8080 are available from outside your network and you should be good to go. Which web server are you using?
 
  • Rep+
Reactions: killabytes

·
Registered
Joined
·
2,039 Posts
Quote:
Originally Posted by killabytes View Post

Well GoDaddy doesn't offer parking on sub-domains, so I can't host an HTML doc with them. But I could point the sub-domain to my server with a HTML doc that re-directs...right?
There are certain types of A records that will redirect to ports, and do a webhop. You may want to see how you can do that with them, then you can just make the DNS record redirect to port 8080. You can even do it in the background, so in firefox it would just show security.domain.com even though you've been redirected to a new port. Similar to a CNAME.
 

·
Premium Member
Joined
·
4,947 Posts
Discussion Starter · #16 ·
Quote:
Originally Posted by parityboy View Post

Yes, you could do that. A better way might be to set up your existing web server to handle the domain/port combination so that a call to security.mydomain.com will redirect to mydomain.com:8080; it wouldn't be an HTML document as such, the server itself would send the redirect.
Make sure that ports 80 and 8080 are available from outside your network and you should be good to go. Which web server are you using?
My web servers are all apache2.
 

·
Premium Member
Joined
·
8,040 Posts
Quote:
Originally Posted by jibesh View Post

Give this Apache doc a read. It explains how to use virtualhosts in Apache so you can redirect requests to different ports. Scroll down to the section "Running different sites on different ports."
I've done this successfully in IIS but never tried it in Apache. Let us know how it works out.
http://httpd.apache.org/docs/2.0/vhosts/examples.html
it's very easy in apache:

Code:

Code:
RewriteEngine on
rewritecond %{http_host} ^webcam.domain.com [nc]
rewriterule ^(.*)$ http://webcam.domain.com:8080/$1 [r=301,nc]
if that's dumped into the .htaccess of your main domain, then you wouldn't even need to create a vhost (of course a vhost would be tidier from a sys admin perspective)
 

·
Premium Member
Joined
·
4,947 Posts
Discussion Starter · #19 ·
Quote:
Originally Posted by Plan9 View Post

it's very easy in apache:

Code:

Code:
RewriteEngine on
rewritecond %{http_host} ^webcam.domain.com [nc]
rewriterule ^(.*)$ http://webcam.domain.com:8080/$1 [r=301,nc]
if that's dumped into the .htaccess of your main domain, then you wouldn't even need to create a vhost (of course a vhost would be tidier from a sys admin perspective)
I already employ several Vhosts on my system. I'd prefer not to mix my site with my security camera though
tongue.gif
 

·
Premium Member
Joined
·
8,040 Posts
Quote:
Originally Posted by killabytes View Post

I already employ several Vhosts on my system. I'd prefer not to mix my site with my security camera though
tongue.gif
So put the htaccess code I posted in a directory field on your subdomains vhost. It's doing exactly the same thing but will keep your vhost configs tidy
wink.gif
 
1 - 20 of 24 Posts
Top