Problem with wildcard of domain in nginx and in https

I have a domain.com and i can redirecto to other subdomains but not
domain.com in https, my configuration is the following :

server {
listen 80;
server_name www.domain.com;
rewrite ^/(.*) https://www.domain.com/$1 permanent;
}

server {
listen 80;
server_name m.domain.com;

  ## redirect http to https ##
  rewrite ^/(.*) https://m.domain.com/$1 permanent;

}

server {
listen 443 ssl spdy;

     server_name www.domain.com;

     ...

}

server {
listen 443 ssl spdy;

     server_name domain.com;

     ...

}

server {
listen 443 ssl spdy;

     server_name www.domain.com;

     ...

}

server {
listen 443 ssl spdy;

     server_name m.domain.com;

     ...

}

Posted at Nginx Forum:

The problem is https://domain.com is not accessible

Posted at Nginx Forum:

Hello,

Am Mittwoch, 14. Januar 2015, 04:34:34 schrieb ramsoft75:

  listen 80;



     server_name m.domain.com;

     ...

}

I can’t see any redirect to domain.com. Perhaps that’s missing?

regards,
Axel

On 14/01/2015 10:30, ramsoft75 wrote:

With that configuration if a go https://domains.com it gives me a error
“webpage not avaiable”

I’m guessing the above is a typo in the mail and that you’re not
actually trying domainS.com with domain.com configured.

Does domain.com resolve the same as www.domain.com?

When you ping domain.com does it return the same IP as when pinging
www.domain.com, the ping actually working doesn’t matter this it testing
that both resolve correctly.

Steve.

Isn’t this ?

server {
listen 443 ssl spdy;

server_name domain.com;


}

With that configuration if a go https://domains.com it gives me a error
“webpage not avaiable”

Posted at Nginx Forum:

I made a ping into www.domain.com and into domain.com, the Ip’s are not
the
same.

Posted at Nginx Forum:

It is a DNS (not a Nginx) problem. It seems that you have different “IN
A”
records for domain.com & www.domain.com

On Wed, Jan 14, 2015 at 1:46 PM, ramsoft75 [email protected] wrote:

nginx Info Page


Best regards, Juriy Strashnov

Mob. +7 (953) 742-1550
E-mail: [email protected]

Please consider the environment before printing this email.