Serverblocks and SSL Issue

Hi guys,

Hope that this is a easy one to sort. Basically I’m running a shop and a personal blog off the same server.

The shop has ssl cert.

A issue occurs when you navigate to https://blogaddress it pulls the cert from the shop and loads the shops data on the blog address.

blog address : http://www.letsstrikeapose.co.uk/
shop address : http://nailparty.co.uk/
issue address : https://www.letsstrikeapose.co.uk/

Hope that it makes sense.

Thanks

J

Hi jon1,
the address you posted https://www.letsstrikeapose.co.uk is not showing up anything, its blank.
can you send us the output for ee site show www.letsstrikeapose.co.uk .

this was a private reply with post_id 67357

Hi Harshad,
Thanks for the help, realised i tagged the previous post as private.

Display Nginx Configuration For letsstrikeapose.co.uk

WPSINGLE W3 TOTAL CACHE NGINX CONFIGURATION

server {

server_name letsstrikeapose.co.uk http://www.letsstrikeapose.co.uk;

access_log /var/log/nginx/letsstrikeapose.co.uk.access.log rt_cache;
error_log /var/log/nginx/letsstrikeapose.co.uk.error.log;

root /var/www/letsstrikeapose.co.uk/htdocs;
index index.php index.htm index.html;

set $cache_uri $request_uri;

POST Requests And Urls With A Query String Should Always Go To PHP

if ($request_method = POST) {
set $cache_uri ‘null cache’;
}

if ($query_string != “”) {
set $cache_uri ‘null cache’;
}

Don’t Cache Uris Containing The Following Segments

if ($request_uri ~* “(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(index)?.xml|[a-z0-9-]±sitemap([0-9]+)?.xml)”) {
set $cache_uri ‘null cache’;
}

Don’t Use The Cache For Logged In Users Or Recent Commenters

if ($http_cookie ~* “comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in”) {
set $cache_uri ‘null cache’;
}

Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress

location / {
try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args;
}

location ~ ^/wp-content/cache/minify/(.+.(css|js))$ {
try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1;
}

location ~ .php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php;
}

include common/wpcommon.conf;
include common/locations.conf;

}

server {

listen 80;
server_name status.letsstrikeapose.co.uk;

root /var/www/letsstrikeapose.co.uk/htdocs/status;
index index.php index.htm index.html;

set $cache_uri $request_uri;

POST Requests And Urls With A Query String Should Always Go To PHP

if ($request_method = POST) {
set $cache_uri ‘null cache’;
}

if ($query_string != “”) {
set $cache_uri ‘null cache’;
}

Don’t Cache Uris Containing The Following Segments

if ($request_uri ~* “(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(index)?.xml|[a-z0-9-]±sitemap([0-9]+)?.xml)”) {
set $cache_uri ‘null cache’;
}

Don’t Use The Cache For Logged In Users Or Recent Commenters

if ($http_cookie ~* “comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in”) {
set $cache_uri ‘null cache’;
}

Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress

location / {
try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args;
}

location ~ ^/wp-content/cache/minify/(.+.(css|js))$ {
try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1;
}

location ~ .php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php;
}

include common/wpcommon.conf;
include common/locations.conf;
}

Hi jon1,
we are unable to find any ssl config in your given nginx config.
please refer,

Hi Harshad,

Thats correct and the way it is supposed to be.
But if you do navigate to here You will be taken a different site on the server (nailparty). I’m not wanting a SSL on letsstrikeapose. Just wanting to fix the issue if you go to https not going to the second site.

Regards

J

Hi jon1,
we have checked this url https://www.letsstrikeapose.co.uk/, it is navigating nowhere to us.
can’t find issue.

Thanks Harshad,

I have no flushed all local dns cache and it cleared it up. I have no clue as to why it started doing that in the first place on the two machines I use.

Stella support!

Thanks again
J

@jon1,

glad to know your issue is fixed.