LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Can see website via fqdn but not through www (http://www.linuxquestions.org/questions/linux-server-73/can-see-website-via-fqdn-but-not-through-www-602570/)

SamuelHenderson 11-26-2007 06:43 PM

Can see website via fqdn but not through www
 
Hello,

I've been having a bit of a dilemma. Hopefully someone here can help me out.

Router IP address: 24.109.86.89
Server's IP is 192.168.1.100
OS: Fedora 7
Webserver: Apache

I don't really want to reveal my FQDN or domain, although it doesn't really matter as it's more of a hobby thing anyways. For the time being lets say my FQDN is myserver.mydomain.com. As I mentioned in the subject the site can be access through myserver.mydomain.com and via the Router IP. However typing in www.mydomain.com results in a "cannot find server" page.

Any suggestions?

For the record, this is just 1 domain that I want to host on my computer as a hobby. I'm not going to be hosting multiple sites anytime soon (although any I do decide to host in the future will be my own also).

docalton 11-26-2007 07:28 PM

The issue lies in the DNS configuration for your domain.

Whoever manages the DNS for your domain can add the correct entry to make that happen. They will either add another A record for your host or add a CNAME pointer to the existing A record.

Hope this helps.

SamuelHenderson 11-26-2007 08:00 PM

Ahh I see. So if Godaddy is taking care of the DNS stuff for me (I assume they are anyways), then I can presumably add that myself from Godaddy (or get them to if I can't) right?

docalton 11-26-2007 08:03 PM

Yes, that is correct.

Good luck

SamuelHenderson 11-26-2007 08:09 PM

Actually, I just went there and tried to modify the Zone File, however in the TotalDNS Control area it says "(not hosted here)"

I was mucking around with BIND on the server, but as far as I can remember I gave up on that. I don't even think named is running.

Edit:

Ok. I figured out why I have no control over the DNS stuff from Godaddy. It's because I am not using their nameservers. I opted to use my FQDN as the first nameserver and another generic nameserver as the second.(MYSERVER.MYDOMAIN.COM and NS2.NORTHER-ONTARIO.COM)

So it seems like since Godaddy is not taking care of the DNS stuff maybe I should. Should I start working on getting BIND up and running? Or would it be easier to just use Godaddy's nameservers and use their DNS tools?

docalton 11-26-2007 08:16 PM

Well, try using whois to lookup the DNS server information on your domain.

http://www.networksolutions.com/whois/index.jsp

Put in your domain name (not your FQDN) and get the info.

Good luck

jschiwal 11-26-2007 08:17 PM

Are you trying to access your server from the internet or from inside the LAN. If it is the latter, and you aren't running your one DNS server for the lan, add an entry for your fqdn in /etc/hosts. Use the LAN address and not the internet address.

SamuelHenderson 11-26-2007 08:28 PM

Ok. Using the whois tool on "mydomain.com" only shows my personal contact information, Godaddy as the registrar and the it lists the two nameservers I mentioned earlier as the Domain Servers.

Edit:
I get the same results when trying to access www.mydomain.com regardless of whether I am inside the LAN or outside.

docalton 11-26-2007 08:40 PM

Sorry, I didnt see that you posted that as an edit.

With that being said. You will need to get dns working for your domain to do the stuff you want. My suggestion would be to do a little reading on DNS,bind,etc and see whether or not you want to host your own DNS. If you have a dynamic IP address, that pretty much rules out hosting your own.

A quick lookup for free dns showed this. I don't know anything about them, but it sounds interesting.

http://www.granitecanyon.com/

Hope this helps

SamuelHenderson 11-26-2007 08:56 PM

Well, my IP address has not changed in the last 5 months (which is when I started paying attention). I'm assuming it's static, although I suppose my ISP ( Shaw Cable ) could change it whenever they want since I'm not paying the outrageous fee for the static IP address.

It's actually been a couple of months since I was working on this, I got to this point when I decided to take a break.

I can see that when I try to start named it gives me some error messages

Quote:

Starting named:
Error in named configuration:
zone mydomain.com/IN: loading from master file mydomain.zone failed: file not found
_default/mydomain.com/IN: file not found
zone localdomain/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 42
zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 42
zone 255.in-addr.arpa/IN: loaded serial 42
zone 0.in-addr.arpa/IN: loaded serial 42
[FAILED]
I remember I was trying to play around with a GUI tool for BIND and tried to add a CNAME and Zone, looks like I didn't do it right:D

Edit:
Ok sweet. I have some exciting (and somewhat puzzling) updates.

I created the "mydomain.zone" file and filled it with the following info:
Quote:

$TTL 86400
$ORIGIN schenders.com.
@ 1D IN SOA myserver.mydomain.com. myserver.mydomain.com. (
2002022401 ; serial
3H ; refresh
15 ; retry
1w ; expire
3h ; minimum
)
IN NS myserver.mydomain.com. ; in the domain
IN NS ns2.northern-ontario.com. ; external to domain

; server host definitions
myserver IN A 192.168.1.100 ;name server definition
www IN A 192.168.1.100 ;web server definition
I restarted BIND /etc/init.d/named restart and it restarted fine. I also logged into my router and forwarded port 53 (TCP & UDP) to 192.168.1.100.

I tried accessing www.mydomain.com and success! It worked! Or at least it seemed that way. I logged on to my laptop (running Windows XP) and tried to view the site... and I couldn't. I soon discovered that it wasn't just my site I couldn't view, but I couldn't view anything, not even google. I figured it must be some wonky BIND setting... so I stopped named and got back on the laptop. (Which I am using to post right now).

I guess what is happening is that the laptop is automatically looking to my server for DNS resolution? What is the simple fix here, I feel really close :D

docalton 11-27-2007 09:27 AM

When your laptop wasnt able to connect to anything, was it configured to use your DNS server?

If so, you may need to allow recursion for your local subnet. You would do this by editing the named.conf file. This file is normally located in the /etc directory.
A line such as this in the options area:
allow-recursion { localhost; };
Change localhost to be a list of ip addresses for a range.

If not, there is something still crazy in your dns configuration.
Things to check would be to make sure you are listening on the same port that you have forwarded. Make sure your ip address hasn't changed.
Make sure that it's answering authoritatively (sp??) for your domain.

Some of these you can check using nslookup, some of these things you can check with a third party dns checker.

http://www.dnsstuff.com/ Im sure that there are others as well.

Log into your machine:
use nslookup to query your own system by:
nslookup - localhost
You can also test to make sure recursion is on and working by trying to use your dns system to resolve say linuxquestions.org. If it won't you probably need to add a root-hints file and set up a dns cache. Easily done.

There still are some issues with regards to the secondary dns server, aka are they set up to get the data from your server and are they set up to be notified when changes occur? But lets see if we cant get this done first.

Hope this helps

SamuelHenderson 11-27-2007 10:03 PM

Well. I've found out some rather bad news. My ISP (Shaw cable) absolutely forbids the hosting of any kind of server by a residential customer, and as such they block port 53.

What I have managed to do is use Godaddy's nameservers. Once I selected to use their nameservers, I was able to use their "Total DNS Control" tool. I then modified the A record to point to my IP address. Waited a bit... and success! I can now view my server by www.mydomain.com

I guess this means I'll have to switch to DSL (and go through the hassle of using a Dynamic DNS provider)

Thank you for the help everyone :D :

docalton 11-28-2007 10:57 AM

I'm glad you got it figured out.

Good luck with your site(s).

scotlarsen 11-28-2007 01:38 PM

Quote:

Originally Posted by SamuelHenderson (Post 2972889)
I guess this means I'll have to switch to DSL (and go through the hassle of using a Dynamic DNS provider)

Switching to DSL won't guarantee that ports won't be blocked so be sure to check that out first. BTW - setting up DynDNS typically isn't that big of a hassle unless you run in to an issue where your router can't update Custom DynDNS domains. If that's the case, you have to create a regular free DynDNS domain and have a CNAME record in your custom domain for your free domain host. Hopefully, you wouldn't have that issue.

SamuelHenderson 11-29-2007 11:49 AM

I've spoken to various people from the DSL provider. They claim they to allow customer's hosting servers, and will not block any ports.


All times are GMT -5. The time now is 11:21 AM.