Skip to content

Commit 1810597

Browse files
author
Marius Burkard
committed
- move apache vhost to conf file instead
1 parent 9e9e080 commit 1810597

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

install/lib/installer_base.lib.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,9 +2723,13 @@ private function curl_request($url, $use_ipv6 = false) {
27232723
private function make_acme_vhost($server_name, $server = 'apache') {
27242724
global $conf;
27252725

2726-
$use_template = 'apache_acme.vhost.master';
2726+
$use_template = 'apache_acme.conf.master';
2727+
$use_symlink = '999-acme.conf';
2728+
$use_name = 'acme.conf';
27272729
if($server === 'nginx') {
27282730
$use_template = 'nginx_acme.vhost.master';
2731+
$use_symlink = '999-acme.vhost';
2732+
$use_name = 'acme.vhost';
27292733
}
27302734

27312735
$vhost_conf_dir = $conf[$server]['vhost_conf_dir'];
@@ -2746,13 +2750,13 @@ private function make_acme_vhost($server_name, $server = 'apache') {
27462750
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
27472751
}
27482752

2749-
wf($vhost_conf_dir.'/acme.vhost', $tpl->grab());
2753+
wf($vhost_conf_dir.'/' . $use_name, $tpl->grab());
27502754

2751-
if(@is_link($vhost_conf_enabled_dir.'/999-acme.vhost')) {
2752-
unlink($vhost_conf_enabled_dir.'/999-acme.vhost');
2755+
if(@is_link($vhost_conf_enabled_dir.'/' . $use_symlink)) {
2756+
unlink($vhost_conf_enabled_dir.'/' . $use_symlink);
27532757
}
2754-
if(!@is_link($vhost_conf_enabled_dir.'/999-acme.vhost')) {
2755-
symlink($vhost_conf_dir.'/acme.vhost', $vhost_conf_enabled_dir.'/999-acme.vhost');
2758+
if(!@is_link($vhost_conf_enabled_dir.'' . $use_symlink)) {
2759+
symlink($vhost_conf_dir.'/' . $use_name, $vhost_conf_enabled_dir.'/' . $use_symlink);
27562760
}
27572761

27582762
if($conf[$server]['installed'] == true && $conf[$server]['init_script'] != '') {
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
<VirtualHost *:80>
2-
3-
ServerName <tmpl_var name='domain'>
4-
5-
DocumentRoot /usr/local/ispconfig/interface/acme
1+
Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge
62

73
<Directory /usr/local/ispconfig/interface/acme>
84
AllowOverride None
@@ -13,6 +9,3 @@
139
Allow from all
1410
</tmpl_if>
1511
</Directory>
16-
17-
</VirtualHost>
18-

0 commit comments

Comments
 (0)