Free SSL Certificate Setup & Renewal
Thanks to the open-source acme.sh project, you can easily apply for and automatically renew free SSL certificates for your WuWei platform.
1. Copy the Automation Script
Navigate to the project root directory and copy the sample script:
cd /root/ctc-docker
cp site-acme.sh.sample site-acme.sh
2. Modify & Execute Script
Modify the email
and domain
in the site-acme.sh script, and execute the script:
bash site-acme.sh
3. Copy the SSL Configuration File
Navigate to the nginx config directory and prepare the SSL configuration:
cd /root/ctc-docker/nginx/conf.d
cp ssl-default.conf.sample ssl-default.conf
4. Update SSL Configuration
Edit ssl-default.conf
and replace your_domain.com
with your actual domain. The following certificate paths are fixed and used by the automated script:
server_name your_domain.com;
ssl_certificate /etc/nginx/ssl/acme.wuwei.crt;
ssl_certificate_key /etc/nginx/ssl/acme.wuwei.key;
5. Disable the Default Config
Rename the existing default nginx config to avoid conflict:
mv default.conf default.conf.bak
6. Restart Nginx Container
Apply your changes by restarting the Nginx container:
docker restart wuwei-nginx
7. Verify HTTPS Access
Open your browser and access your WuWei site via:
https://{your_domain}
Make sure the SSL certificate is valid and the site loads securely.
Renewal
The acme.sh
tool handles certificate renewal automatically. You can verify or customize the renewal process inside the site-acme.sh
script or by checking the cron job installed by acme.sh
.