Problem with wildcard of domain in nginx and in https

Axel ar at xlrs.de
Wed Jan 14 09:46:34 UTC 2015


Hello, 

Am Mittwoch, 14. Januar 2015, 04:34:34 schrieb ramsoft75:
> 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;
> 
>          ...
> }

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

regards, 
Axel 


> 
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,256099,256099#msg-256099
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list