BUG1: 更新证书按钮中,会不断重复生成—-BEGIN与—-END标签对,促使站点conf文件不断增大。
BUG2: 编辑证书无法保存。
/usr/local/amh/web/Controller/amssl.php中,大约第152行“//保存证书,修改主机conf”注释下,增加以下代码
####### bug fix $nginx_ssl_conf = file_get_contents($nginx_vhost_conf); $nginx_ssl_conf = preg_replace('/\n#------SSL BEGIN(.*)#------SSL END/is', '', $nginx_ssl_conf); file_put_contents($ssl_nginx_tmpfile, $nginx_ssl_conf); $apache_ssl_conf = file_get_contents($apache_vhost_conf); $apache_ssl_conf = preg_replace('/\n#------SSL BEGIN(.*)#------SSL END/is', '', $apache_ssl_conf); file_put_contents($ssl_apache_tmpfile, $apache_ssl_conf); $cmd = "amh module AMSSL-1.0 admin restore,{$ssl_vhost_new},;"; $cmd = Functions::trim_cmd($cmd); shell_exec($cmd); ####### bug fix
/usr/local/amh/web/Controller/amssl.php中,大约第133行后,增加以下代码。
$file3 = "{$ssl_dir}{$ssl_vhost_new}.csr";
/usr/local/amh/lib/modules/AMSSL-1.0/AMHScript 中大约第68行“fi;”循环语句后增加以下代码。
chown www:www /usr/local/amh/conf/ssl/$vhost.csr chown www:www /usr/local/amh/conf/ssl/$vhost.key chown www:www /usr/local/amh/conf/ssl/$vhost.cer
/usr/local/amh/web/View/amssl.php 中大约第99行,将 name=“ssl_key” 修改为
name="ssl_csr"