Problem with SSL

ron ramos nhadie at gmail.com
Thu Sep 8 04:01:27 UTC 2016


Just add another server block on domain1 that listens to 443 ..and redirect
it to http if you ..or just give an error

On 8 Sep 2016 11:59 a.m., "Kurogane" <nginx-forum at forum.nginx.org> wrote:

> Domain 1
>
> server {
>         listen 80;
>         server_name domain1.com;
>         return 301 $scheme://www.$host$request_uri;
> }
>
> server {
>         listen 80;
>         server_name www.domain1.com;
>         root  /home/domain1/public_html;
>         ...
> }
>
> Domain 2 (SSL)
>
> server {
>         listen 80;
>         server_name domain2.com;
>         return 301 $scheme://www.$host$request_uri;
> }
>
> server {
>         listen 80;
>         server_name www.domain2.com;
>         return 301 https://$host$request_uri;
> }
>
> server {
>         listen 443 ssl http2;
>         server_name www.domain2.com;
>
>         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
>         ssl_certificate      /home/nginx/ssl/domain2.com/domain2.com.crt;
>         ssl_certificate_key  /home/nginx/ssl/domain2.com/domain2.com.key;
>         root  /home/domain2/public_html;
>         ...
> }
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,269401,269417#msg-269417
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160908/b9abea22/attachment.html>


More information about the nginx mailing list