SSL for subdomain www.old.website.com doesnt work

Hello!

I have website running on CentOS 6 with letsencrypt certificate, I have added new domain to virtualhosts

ServerName old.mywebsite.com
ServerAlias www.old.mywebsite.com
DocumentRoot /home/mywebsite.com/public_html/old

But SSL not working for my old subdomain, what should I do to make it work?

Thanks

Check your Apache configuration with:
apachectl -S

[warn] NameVirtualHost XX.XX.XX.XX:80 has no VirtualHosts
VirtualHost configuration:
ZZ.ZZ.ZZ.ZZ:80 is a NameVirtualHost
default server mywebsite.com (/etc/httpd/conf/httpd.conf:1031)
port 80 namevhost mywebsite.com (/etc/httpd/conf/httpd.conf:1031)
alias www.mywebsite.com
alias webmail.mywebsite.com
alias admin.mywebsite.com
port 80 namevhost old.mywebsite.com (/etc/httpd/conf/httpd.conf:1060)
alias www.old.mywebsite.com
ZZ.ZZ.ZZ.ZZ:443 mywebsite.com (/etc/httpd/conf/httpd-le-ssl.conf:2)
wildcard NameVirtualHosts and default servers:
default:443 XXXXX.s.dedikuoti.lt (/etc/httpd/conf.d/ssl.conf:76)
: XXXXX.s.dedikuoti.lt (/etc/httpd/conf/httpd.conf:1022)
Syntax OK

actual ip addresses and domain names, please.

how am I going to test a machine I cannot connect to?

I can’t post them here, I can send you in PM

Nope. However, it looks like you don’t have a virtualhost on port 443 for old.yourdomain, have you run your acme client?

No, I don’t know how to do it

is certbot installed on your machine?

then run it.

The output shows:

Using port 80:

Using port 443:

If you need more than that, you will have to add it into your Apache config.
[which may require obtaining additional certs (or adding names to existing certs)]
[you can review the names covered with: certbot certificates]

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.