I’ve been accessing my aapanel using an IP address and self-signed SSL certificate, but recently Google Chrome has been blocking me from accessing the panel. Can anyone help me by providing detailed instructions on adding a domain and a free Let’s Encrypt SSL certificate to the aapanel so I can access it without any issues?
Here is a step by step guide about adding domain and SSL to aapanel.
- Suppose you want to add ‘cp.example.com’. Now create a DNS record (A type) pointing to the IP address.
- If you are using Cloudflare, set it to “DNS Only.”
- Disable SSL and add the domain cp.example.com from aaPanel’s Settings Page.
- Now enable panel SSL and set ‘Let’s Encrypt’. It will enable SSL and secure your panel.
The SSL may not auto renew, but you can do a quick hack to auto renew the panel SSL.
- Create a website on aaPanel using the same domain name as the panel’s domain ‘cp.example.com’.
- Enable SSL for the website.
- Connect the server with SSH.
- Goto panel SSL directory.
- Take a backup of existing certificates to a safe place.
mv * /root/backup
- Remove everything from the directory.
- Create symlinks to the SSL
ln -s /www/server/panel/vhost/cert/cp.example.com/privkey.pem privateKey.pem
ln -s /www/server/panel/vhost/cert/cp.example.com/fullchain.pem certificate.pem
- Enable CRON Jobs for the Let’s Encrypt Certificate.