Welcome! Log In Create A New Profile

Advanced

Problem with www. subdomain

Posted by sgdw 
Problem with www. subdomain
May 22, 2009 06:39AM
Hi, i've installed debian and nginx on it with php and vhost_alias, i 've configurd vhosts and bind correctly i think, because my main domain is working, but my domain with www. is not.
mydomain.com - is working
www.mydomain.com - is not working.

That's my configuration file from bind for that domain.

[code]
;
$TTL 3600
@ IN SOA r20027.ovh.net. root.r20027.ovh.net. (
2002070212 ;serial
86400 ;refresh
3600 ;retry
3600000 ;expire
1209600 ;minimum
)
;
IN NS r20027.ovh.net. ;adres naszego Primary DNS
IN NS sdns1.ovh.net. ;adres naszego Secondary DNS
;
;
@ IN A 87.98.150.117 ;adres IP naszego serwera trzymającego te domenę (zwykle ten na którym aktualnie piszemy ten plik)
howks IN A 87.98.150.117 ;definicja www.debian.one.pl
www IN A 87.98.150.117 ;definicja howks.debian.one.pl
ns1 IN A 87.98.150.117
ns2 IN A 213.251.188.140
www IN NS r20027.ovh.net. ;wydelegowanie domeny drugi.debian.one.pl z primary DNS'em pod adresem ns1.czyjas domena.org
www IN NS sdns1.ovh.net. ;secondary dns dla drugi.debian.one.pl

[/code]


And that's my vhost configuration file for that domain.

[code]
server {

listen 80;

server_name .heycandy.info;
server_name_in_redirect on;
index index.php;

root /var/www/heycandy;


location = /50x.html {
error_page 500 502 503 504 /50x.html;
root /var/www/nginx-default;
}

location ~ .php$ {

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;

}

}
[/code]
it file named by me "mydomain" in sites-available.
Please say me what could I do to make my site working with this particulary subdomain.

Thx for help in advice and sorry for my bad english.
Re: Problem with www. subdomain
May 22, 2009 07:50AM
Hi,

Your English is fine.

There are several DNS problems with this domain. Running your own authoritative name server might be a good idea.

See http://intodns.com/heycandy.info and/or http://private.dnsstuff.com/tools/dnsreport.ch?domain=heycandy.info&token=13605694a6c268c5065589961a7af019.

As for your nginx configuration, I would change:

[code]
server_name .heycandy.info;
[/code]

to

[code]
server_name heycandy.info www.heycandy.info;
[/code]

or

[code]
server_name heycandy.info *.heycandy.info;
[/code]


If you want to rewrite www.heycandy.info to heycandy.info then:

[code]
server {
listen 80;
server_name heycandy.info;

...

}

server {
listen 80;
server_name www.heycandy.info;

...

rewrite ^ http://heycandy.info$request_uri? permanent;
}

[/code]

--
Jim Ohlstein



Edited 1 time(s). Last edit at 05/22/2009 12:54PM by Jim Ohlstein.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready