What should I do if I encounter error 500 after installing a Let's Encrypt SSL certificate in the CWP control panel ?
After the Letsencrypt test installation, when accessing the https page, a 500 error message is displayed, as follows:
Internal Server Error
The server encountered year internal error or misconfiguration and was Unable to complete your request.
The translation is as follows:
internal server error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Q: How can this problem be solved?
A: After testing, Chen Weiliang found that the problem was caused by the absence of the suPHP_UserGroup user group in the Apache configuration file.
Examples
<Directory "/home/xx/public_html"> AllowOverride All suPHP_UserGroup xx xx </Directory>
Here is the complete information for Apache to configure SSL (note to uncomment and change the path to your own):
<VirtualHost *:443> DocumentRoot /home/admin/web/chenweiliang.com/public_html //网站目录 ServerName www.chenweiliang.com:443 //域名 ServerAdmin [email protected] //邮箱 ErrorLog "/var/log/www.chenweiliang.com-error_log" //错误日志 CustomLog "/var/log/www.chenweiliang.com-access_log" common //访问日志 SSLEngine on SSLCertificateFile /etc/letsencrypt/live/www.chenweiliang.com/fullchain.pem //之前生成的证书 SSLCertificateKeyFile /etc/letsencrypt/live/www.chenweiliang.com/privkey.pem //之前生成的密钥 <Directory "/home/admin/web/chenweiliang.com/public_html"> //网站目录 SetOutputFilter DEFLATE Options FollowSymLinks AllowOverride All suPHP_UserGroup eloha eloha //用户组(有些服务器配置需要,有些可能不需要,出错请删除此行) Order allow,deny Allow from all DirectoryIndex index.html index.phps </Directory> </VirtualHost>
Finally restart apache on it:
service httpd restart
If there is still an error, please check this article for details:
Extended reading:
Hopefully, the article "What to do if error 500 occurs after installing Let's Encrypt SSL certificate in CWP control panel?" shared on Chen Weiliang's blog ( https://www.chenweiliang.com/ ) will be helpful to you.
Feel free to share this article's link: https://www.chenweiliang.com/cwl-534.html

