1

Firts of sorry about my poor english, but I'll do my best. Currently I manage 2 domain on my $5 DigitalOcean droplet and have use Cloudflare as my DNS manager with Flexible SSL configuration, everything works fine until I decide to change to Full SSL configuration with SSL certificate from Cloudflare (blog[dot]cloudflare[dot]com/universal-ssl-encryption-all-the-way-to-the-origin-for-free/).

Let say, my domains are domain.com and example.com. When I access them over HTTP both looks fine.

  • http;//example[dot]com : showing right content from example.com which is WP site
  • http;//domain[dot]com : showing right content from domain.com which is Jekyll generated HTML site

But, when I try to access it from HTTPS, it's look odd.

  • https;//example[dot]com : showing right content from example.com which is WP site
  • https;//domain[dot]com : showing the content from example.com which is WP site?

Here my nginx example.com.conf

server {
    listen 80;
    listen 443 ssl;
    server_name example.com;

    root  /var/www/sites/example.com/;

    # Logging Settings
    access_log  /var/www/logs/example.com-access.log;
    error_log   /var/www/logs/example.com-error.log;

    location / {
        try_files  $uri $uri/ /index.php;
        index      index.php index.html index.htm;
    }

    #ssl on;
    ssl_certificate     /var/www/certs/example.com.crt;
    ssl_certificate_key /var/www/certs/example.com.key;
    #ssl_session_timeout 5m;
    ssl_protocols   SSLv3 TLSv1.2;
    ssl_ciphers     AES256+RSA:!aNULL;
    ssl_prefer_server_ciphers on;

    # Wordpress SEO
    rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
    rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

    include  /var/www/sites/example.com/nginx.conf;
    include  /etc/nginx/conf.d/error_page.conf;
    include  /etc/nginx/conf.d/common.conf;
    include  /etc/nginx/conf.d/phpcgi.conf;
}

and here from my domain.com.conf

server {
    listen 80 default_server;
    listen 433 ssl;
    server_name domain.com;

    root  /var/www/sites/domain.com/;

    # Logging Settings
    access_log  /var/www/logs/domain.com-access.log;
    error_log   /var/www/logs/domain.com-error.log;

    location / {
        index      index.html index.htm;
    }

    #ssl on;
    ssl_certificate     /var/www/certs/domain.com.crt;
    ssl_certificate_key /var/www/certs/domain.com.key;
    #ssl_session_timeout 5m;
    ssl_protocols   SSLv3 TLSv1.2;
    ssl_ciphers     AES256+RSA:!aNULL;
    ssl_prefer_server_ciphers on;

    include /etc/nginx/conf.d/error_page.conf;
    include /etc/nginx/conf.d/common.conf;
    #include /etc/nginx/conf.d/phpcgi.conf;
}

and here my /etc/hosts file

127.0.0.1 localhost domain.com example.com

123.456.789.987 domain.com example.com

anyone have solution?

Ps. I can't post a link just yet.

Thank you :)

1
  • 2
    You have a typo in your domain.com.conf listen 433 ssl; should be listen 443 ssl;
    – lsmooth
    Apr 25, 2015 at 20:37

1 Answer 1

1

Answered by @Ismooth (in question comment), thank you.

You have a typo in your domain.com.conf listen 433 ssl; should be listen 443 ssl;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .