Skip to content

Commit 545abdd

Browse files
author
vogelor
committed
Fixed a error in handling SSL
1 parent 0842fa3 commit 545abdd

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

server/conf/vhost.conf.master

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
</tmpl_if>
185185
</tmpl_if>
186186

187-
ServerName <tmpl_var name='domain'>
187+
ServerName <tmpl_var name='ssl_domain'>
188188
<tmpl_if name='alias'>
189189
<tmpl_var name='alias'>
190190
</tmpl_if>
@@ -203,10 +203,10 @@
203203

204204
</tmpl_if>
205205
SSLEngine on
206-
SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.crt
207-
SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.key
206+
SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt
207+
SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key
208208
<tmpl_if name='has_bundle_cert'>
209-
SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.bundle
209+
SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.bundle
210210
</tmpl_if>
211211

212212
<Directory {tmpl_var name='web_document_root_www'}>

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function ssl($event_name,$data) {
157157
//* Save a SSL certificate to disk
158158
if($data["new"]["ssl_action"] == 'save') {
159159
$ssl_dir = $data["new"]["document_root"]."/ssl";
160-
$domain = $data["new"]["domain"];
160+
$domain = $data["new"]["ssl_domain"];
161161
$csr_file = $ssl_dir.'/'.$domain.".csr";
162162
$crt_file = $ssl_dir.'/'.$domain.".crt";
163163
$bundle_file = $ssl_dir.'/'.$domain.".bundle";
@@ -174,7 +174,7 @@ function ssl($event_name,$data) {
174174
//* Delete a SSL certificate
175175
if($data["new"]["ssl_action"] == 'del') {
176176
$ssl_dir = $data["new"]["document_root"]."/ssl";
177-
$domain = $data["new"]["domain"];
177+
$domain = $data["new"]["ssl_domain"];
178178
$csr_file = $ssl_dir.'/'.$domain.".csr";
179179
$crt_file = $ssl_dir.'/'.$domain.".crt";
180180
$bundle_file = $ssl_dir.'/'.$domain.".bundle";
@@ -556,10 +556,11 @@ function update($event_name,$data) {
556556
$vhost_data["security_level"] = $web_config["security_level"];
557557
$vhost_data["allow_override"] = ($data["new"]["allow_override"] == '')?'All':$data["new"]["allow_override"];
558558
$vhost_data["php_open_basedir"] = ($data["new"]["php_open_basedir"] == '')?$data["new"]["document_root"]:$data["new"]["php_open_basedir"];
559+
$vhost_data["ssl_domain"] = $data["new"]["ssl_domain"];
559560

560561
// Check if a SSL cert exists
561562
$ssl_dir = $data["new"]["document_root"]."/ssl";
562-
$domain = $data["new"]["domain"];
563+
$domain = $data["new"]["ssl_domain"];
563564
$key_file = $ssl_dir.'/'.$domain.".key";
564565
$crt_file = $ssl_dir.'/'.$domain.".crt";
565566
$bundle_file = $ssl_dir.'/'.$domain.".bundle";

0 commit comments

Comments
 (0)