can not browse using "WWW" prefix

Discussion in 'Installation/Configuration' started by domino, Aug 16, 2005.

  1. domino

    domino New Member

    Hi,

    I think i'm the only with this problem. When I try to browse my site with the "www" prefix, images and certain pages doesn't work. But if I use: http://ip.address or http://domain.com, it's all peachy. I don't know what the problem is. This isn't inherent with this install only. I have the same problem with my win/apache setup. If I can provide any more information to help me solve this, please ask. I would like to finally put the problem to rest after not finding a solution for 2months now.
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. domino

    domino New Member

    Hi,

    I have a dynamic IP so I configured my registrar DNS setting to reflect ZoneEdit DNS servers. ZoneEdit is where I configured my A Record and Aliases (CNAME). Then I have my windows/unix zone client update my IP to ZoneEdit and it automatically changes my IP.

    Having giving you this informarmation, does this mean I don't need to run my own DNS server? I have no expereince with BIND, so ZoneEdit is what I would preffer. So I don't break anything in ISPConfig, is it okay to change the default apache hpptd.conf file to my requirements?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    No, you don't need to run your own DNS server if you can manage your domains somewhere else.

    But why do you want to edit your httpd.conf, it has nothing to do with DNS?
     
  5. domino

    domino New Member

    That's great to know. It's one less service I have to manage. By the way, this is a pet project and I'm not hosting clients. I have 3 or 4 low bw domains that I own and would like to run here on my virtual fedora.

    That show you how much I know. httpd.conf is the only place I know where I can add and config ServerName and ServerAlias right? If not, can you point me in the right direcion? I think I can mangae from there.
     
    Last edited: Aug 16, 2005
  6. falko

    falko Super Moderator Howtoforge Staff

    If you have domain.com and www.domain.com either under ServerName or ServerAlias in the vhost container of your web site in the Apache configuration, then all you have to do is to set up proper DNS records for domain.com and www.domain.com. Since domain.com is working for you I guess you have to set up an A record for www.domain.com pointing to your ISPConfig system.

    If domain.com or www.domain.com are not in ServerName or ServerAlias then go to the web site in ISPConfig and enter domain.com/www.domain.com under Co-Domains.
     
  7. domino

    domino New Member

    I am utterly lost as I have no idea where to go edit the ServerName or ServerAlias. Should I check the httpd.conf or ZoneEdit or my Registrar? ISPConfig is somewhat useless at the moment because the links on the right points to http://www and the content in the main body shows a 404 on most of the pages I try to enter.

    Note: People outside my network can access both http://domain.com and http://www.domain.com just fine. It's only that I can't access with www prefix. This is making me nuts :eek:
     
  8. domino

    domino New Member

    I think i'm getting somewhere falko. I added the fallowing entry in my windows HOSTS file (in bold). I can access ISPConfig without any errors. Now my question is, Is this the "proper" way to configure? Or is this just a work around? I would like to configure it the proper way.

    192.168.2.100 domain.com www.domain.com
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Ok, I think I have an idea why this happens. Say your router has the internet IP address 81.82.83.84 and a local IP address 192.168.2.1 (you're using the local net 192.168.2.0). When external users try to access www.domain.com, the DNS server tells them it's 81.82.83.84, they go to your router, and your router does port forwarding to 192.168.2.100. Everything's fine.

    When you do this from your local network, when you reach the router, I think the router decides that you're already in the local network and that there's no need for port forwarding, so you don't see www.domain.com... :(

    Leave it as it is! :)
     
  10. domino

    domino New Member

    Thank you falko! I have been wanting that type of explanation in all the places I have read. You just gave the best explanation that I understood. :cool:

    Thank you for the assistance. You and your crew and the awsome members here are very helpful. Now off to configure a unix DNS client. I'm sure it is posted here.

    Very best regards
     
  11. domino

    domino New Member

    Hi sorry to raise the dead.

    I am now on a Debian system (Ubuntu). Can you please tell me where I can edit so that I can browse the websites using my FQDN inside my network.

    hosts
    Code:
    127.0.0.1 localhost.localdomain localhost linux linux.myfqdn.com
    192.168.2.100 linux.myfqdn.com linux
    192.168.2.101 linux-ip1.myfqdn.com linux-ip1
    
    thank again
     
  12. domino

    domino New Member

    I think I fixed it myself. But will it cause problems from browsing outside the network? I also maintain 3 other FQDN. Can I also add the domain names in the line 192.168.2.100? Will doing so complicate things?

    Code:
    127.0.0.1 localhost.localdomain localhost linux linux.myfqdn.com
    192.168.2.100 linux.myfqdn.com [COLOR=Red]myfqdn.com www.myfqdn.com[/COLOR] linux
    192.168.2.101 linux-ip1.myfqdn.com linux-ip1
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Not if you always use your desktop from within your network. If it's a notebook that you sometimes use outside your network then you got a problem.

    But you could set up a DNS server in your local network that resolves the domains in question to their IP address in the local network.
     
  14. domino

    domino New Member

    Ok, now this is really getting on my nerves. I have 4 domains set up on ispc installed in Breezy Badger. The main domain with it's own IP address 192.168.2.100 works with and without the www prefix. I have 3 other domains under IP address 192.168.2.101. All but 1 domain works! The rest of the domains will either get a connection refused or it will load the default domain on IP 192.168.2.100. I don't really understand what's going on.

    Can you please tell me how to set up the DNS for puters inside the network?
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Please post the output of
    Code:
    netstat -tap
    http://www.howtoforge.com/howto_bind_chroot_debian
    http://www.howtoforge.com/debian_dns
     
  16. domino

    domino New Member

    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN     7667/mysqld
    tcp        0      0 *:81                    *:*                     LISTEN     8069/ispconfig_http
    tcp        0      0 linux.newmediafa:domain *:*                     LISTEN     8520/named
    tcp        0      0 *:ftp                   *:*                     LISTEN     8550/proftpd: (acce
    tcp        0      0 localhost:domain        *:*                     LISTEN     8520/named
    tcp        0      0 localhost:domain        *:*                     LISTEN     8520/named
    tcp        0      0 linux-ip1.newmed:domain *:*                     LISTEN     8520/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     8520/named
    tcp        0      0 *:smtp                  *:*                     LISTEN     18032/master
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     8520/named
    tcp        0      0 linux-ip1.newmedi:45837 64.233.167.:xmpp-client ESTABLISHED9795/gaim
    tcp        0      0 linux-ip1.newmedi:45838 64.233.167.:xmpp-client ESTABLISHED9795/gaim
    tcp        0      0 linux-ip1.newmedi:34178 cs47.msg.dcn.yahoo:5050 ESTABLISHED9795/gaim
    tcp6       0      0 *:imaps                 *:*                     LISTEN     7564/couriertcpd
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     7605/couriertcpd
    tcp6       0      0 *:pop3                  *:*                     LISTEN     7582/couriertcpd
    tcp6       0      0 *:imap2                 *:*                     LISTEN     7541/couriertcpd
    tcp6       0      0 *:www                   *:*                     LISTEN     24836/apache2
    tcp6       0      0 *:ssh                   *:*                     LISTEN     7865/sshd
    tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     8520/named
    tcp6       0      0 *:https                 *:*                     LISTEN     24836/apache2
     
  17. domino

    domino New Member

    About the links for creating an internal DNS. It seams a bit of an overkill to have to install from the how-to's just to be able to access the webserver internally. What I can't seam to grasp is why it is so easy to be able to add the domains in the windows hosts file, yet almost impossible to duplicate on Linux.
     
  18. falko

    falko Super Moderator Howtoforge Staff

    But you can't put the domains in /etc/hosts on the server and then expect the clients to know where the domains are. You have to put the domains in each clients hosts file, not on the server. Or do I misunderstand something? :confused:
     

Share This Page