HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Website works without www but not with www (http://www.howtoforge.com/forums/showthread.php?t=55891)

RioSif 24th January 2012 12:32

Website works without www but not with www
 
Hello there and thanks for your great tuts!
I installed centos 6.2, nginx and ISPconfig 3 with your perfect server tutorial.
I made it dns server and after some effort i finily made it setting the dns correctly and make my domains work from my server but until that time i made dns entries and delete then again till it work.
The same with adding sites with the ISPConfig 3. I added a site then delete it then recreated etc.
Now i have two sites working with the demo page of ISPConfig 3. At dns they have the same records and at sites panel same settings two. The one works ok with www and without(i redirect www to non-www) but the other doesn't work with www. It returns 404.
The working site is k00.me, and the problematic one is riosif.gr.
Here are the configs:
k00.me:
named.conf.local
Code:

zone "k00.me" {
        type master;
        allow-transfer {none;};
        file "/var/named/pri.k00.me";
};

pri.k00.me
Code:

$TTL        14400
@      IN      SOA    ns1.k00.me. admin.k00.me. (
                        2012012302      ; serial, todays date + todays serial #
                        86400              ; refresh, seconds
                        7200              ; retry, seconds
                        3600000              ; expire, seconds
                        86400 )            ; minimum, seconds
;

ftp 14400 A        79.143.185.124
k00.me. 14400 A        79.143.185.124
k00.me. 14400      MX    0  k00.me.
k00.me. 86400      NS        ns1.k00.me.
k00.me. 86400      NS        ns2.k00.me.
localhost.k00.me. 14400 A        127.0.0.1
ns1 86400 A        79.143.185.124
ns2 86400 A        79.143.185.124
webmail 14400 A        79.143.185.124
www 14400      CNAME        k00.me.

riosif.gr:

named.conf.local
Code:

zone "riosif.gr" {
        type master;
        allow-transfer {none;};
        file "/var/named/pri.riosif.gr";
};

pri.riosif.gr:
Code:

$TTL        14400
@      IN      SOA    ns1.riosif.gr. admin.riosif.gr. (
                        2012012401      ; serial, todays date + todays serial #
                        86400              ; refresh, seconds
                        7200              ; retry, seconds
                        3600000              ; expire, seconds
                        86400 )            ; minimum, seconds
;

ftp 14400 A        79.143.185.124
localhost.riosif.gr. 14400 A        127.0.0.1
ns1 86400 A        79.143.185.124
ns2 86400 A        79.143.185.124
riosif.gr. 14400 A        79.143.185.124
riosif.gr. 14400      MX    0  riosif.gr.
riosif.gr. 86400      NS        ns1.riosif.gr.
riosif.gr. 86400      NS        ns2.riosif.gr.
webmail 14400 A        79.143.185.124
www 14400      CNAME        riosif.gr.

And one more thing i noticed is that i can't see www.riosif.gr from my local computer but when i do an nslookup from my server i get:
Code:

[root@ns1 ~]# nslookup www.riosif.gr
Server:        127.0.0.1
Address:        127.0.0.1#53

www.riosif.gr  canonical name = riosif.gr.
Name:  riosif.gr
Address: 79.143.185.124

Code:

[root@ns1 ~]# nslookup riosif.gr
Server:        127.0.0.1
Address:        127.0.0.1#53

Name:  riosif.gr
Address: 79.143.185.124

Your help would be priceless! Thank you in advance

till 24th January 2012 12:54

ensure that you selected "auto subdomain www" in the second website too.

RioSif 24th January 2012 14:28

Finally it seems that it was a browser catching problem.
Problem solved but thanks for the reply


All times are GMT +2. The time now is 09:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.