Skip to content

Commit d0c5a70

Browse files
author
A. Täffner
committed
better apache security, fixed NameVirtualHost Warnings
Warning: Please read Merge Request! This might cause Apache not to listen on custom ports!
1 parent 65610f5 commit d0c5a70

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

install/tpl/apache_ispconfig.conf.master

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
################################################
22
# ISPConfig General Apache Options
33
################################################
4-
4+
ServerTokens ProductOnly
55
ServerSignature Off
66

77

@@ -137,9 +137,10 @@ Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-know
137137
</tmpl_if>
138138
</Directory>
139139

140+
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
140141
NameVirtualHost *:80
141142
NameVirtualHost *:443
142143
<tmpl_loop name="ip_adresses">
143144
NameVirtualHost {tmpl_var name="ip_address"}:{tmpl_var name="port"}
144145
</tmpl_loop>
145-
146+
</tmpl_if>

install/tpl/apache_ispconfig.vhost.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
######################################################
55

66
<tmpl_var name="vhost_port_listen"> Listen <tmpl_var name="vhost_port">
7-
NameVirtualHost *:<tmpl_var name="vhost_port">
7+
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>NameVirtualHost *:<tmpl_var name="vhost_port"></tmpl_if>
88

99
<VirtualHost _default_:<tmpl_var name="vhost_port">>
1010
ServerAdmin webmaster@localhost

0 commit comments

Comments
 (0)