Hello. I am new to using self-hosted solutions. I have a box with Linode. It is set-up with Ubuntu 16.04 running Nginx. I am trying to set-up a few wordpress sites. kaidawei.me will be the main site, and subdomian.
After much difficulty with setting up the main website (I had to delete and reset the box 4 times) i finally got a stable install. I added the subdomain no problem. The main domain was working fine, but now gives warnings when you visit, the subdomain is totally working fine with Let’s Encrypt.
I used the following command to add the subdomain, based on a forum post here:
$sudo certbot -a webroot -i nginx --cert-name kaidawei.me -d www.kaidawei.me -d wpbase.kaidawei.me
The initial command I used was:
$sudo certbot --nginx -d kaidawei.me -d www.kaidawei.me
I verified $sudo ufw status
…
Nginx Full
…
When I run $sudo certbot renew --dry-run - I get no errors.
But in the error logs it seems these errors are related:
2018/03/08 11:21:26 [crit] 23452#23452: *421 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:ssl3_read_b$
2018/03/08 11:21:26 [crit] 23452#23452: *423 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:ssl3_read_b$
2018/03/08 11:21:45 [crit] 23452#23452: *468 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:ssl3_read_b$
2018/03/08 11:21:45 [crit] 23452#23452: *469 SSL_do_handshake() failed (SSL: error:14094085:SSL routines:ssl3_read_b$
–
I have two server block files in the sites-available directory. One for each site: kaidawei.me and wpbase.kaidawei.me
I deleted the default file
for KAIDAWEI.ME (MAIN DOMAIN SITE)
server {
root /var/www/html/kaidawei.me/public_html;
index index.php index.html index.htm index.nginx-debian.html;
server_name kaidawei.me www.kaidawei.me;
location / {
try_files $uri $uri/ /index.php$is_args$args;
#try_files $uri $uri/ =404;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/kaidawei.me/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/kaidawei.me/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
server {
if ($host = www.kaidawei.me) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = kaidawei.me) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name kaidawei.me www.kaidawei.me;
return 404; # managed by Certbot
}
==========================================================================
The server blocks are:
for WPBASE.KAIDAWEI.ME (SUBDOMAIN SITE)
server {
root /var/www/html/wpbase.kaidawei.me/public_html;
index index.php index.html index.htm index.nginx-debian.html;
server_name wpbase.kaidawei.me;
location / {
try_files $uri $uri/ /index.php$is_args$args;
#try_files $uri $uri/ =404;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/kaidawei.me/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/kaidawei.me/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = wpbase.kaidawei.me) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name wpbase.kaidawei.me;
listen 80;
return 404; # managed by Certbot
}
===================================================================
I am not sure where else to look or what to look for. I have tried many things including reconfiguring them.
I have run at various stages AFTER the problem started and to no change:
sudo certbot renew --dry-run
sudo certbot -a webroot -i nginx --cert-name kaidawei.me -d www.kaidawei.me -d wpbase.kaidawei.me --expand
sudo certbot -a webroot -i nginx --cert-name kaidawei.me -d www.kaidawei.me -d wpbase.kaidawei.me
NOTE: SSLLABS give both my sites an A but the main domain gets browser warning.
Thank you for any help on this.