SSL issues with conf file

I’ve used Certbot to install and SSL on my domain for a vps i have but i want to apply the SSL to another conf file within apache, what’s the best way to do this? Just copy the certificate path section into the conf file?

The conf file is for a sub folder on the same domain.


Yes, basically just set the paths for SSLCertificateFile and SSLCertificateKeyFile in Apache to /etc/letsencrypt/live/ and /etc/letsencrypt/live/

Obviously replace with the domain that you got working with certbot. Your Apache config will then look like:

SSLCertificateFile /etc/letsencrypt/live/
SSLCertificateKeyFile /etc/letsencrypt/live/

I use it like this and works fine. In older versions of Apache you needed to use SSLCertificateChainFile as well, since the SSLCertificateFile couldn’t include the chain. But this now works in Apache, so only two lines are needed instead of three with the SSLCertificateChainFile.