Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jozef Sroka
ISPConfig 3
Commits
659b5a40
Commit
659b5a40
authored
Oct 06, 2016
by
Till Brehm
Browse files
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
parents
c1bc454a
2a911896
Changes
4
Hide whitespace changes
Inline
Side-by-side
server/conf/apache_ispconfig.conf.master
View file @
659b5a40
...
...
@@ -3,129 +3,135 @@
# ISPConfig Logfile configuration for vlogger
################################################
LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig
SetEnvIf Request_URI "^/datalogstatus.php$" dontlog
<IfModule mod_headers.c>
<LocationMatch "/.well-known/acme-challenge/*">
Header set Content-Type "text/plain"
</LocationMatch>
</IfModule>
LogFormat "%v %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig env=!dontlog
<Directory /var/www/clients>
AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory>
# Do not allow access to the root file system of the server for security reasons
<Directory />
Options -Indexes
AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory>
<Directory /var/www/conf>
AllowOverride None
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all denied
<tmpl_else>
Order Deny,Allow
Deny from all
</tmpl_if>
</Directory>
# Except of the following directories that contain website scripts
<Directory /usr/share/phpmyadmin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
<Directory /usr/share/phpMyAdmin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
<Directory /srv/www/htdocs>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
<Directory /usr/share/squirrelmail>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
# Allow access to mailman on OpenSuSE
<Directory /usr/lib/mailman/cgi-bin>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
<Directory /usr/lib/mailman/icons>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
<Directory /var/lib/mailman/archives/>
Options +FollowSymLinks
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
# allow path to awstats and alias for awstats icons
<Directory /usr/share/awstats>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</tmpl_if>
</Directory>
<tmpl_if name='apache_version' op='<' value='2.4' format='version'>
Alias /awstats-icon "/usr/share/awstats/icon"
</tmpl_if>
Alias /.well-known/acme-challenge /usr/local/ispconfig/interface/acme/.well-known/acme-challenge
<Directory /usr/local/ispconfig/interface/acme/.well-known/acme-challenge>
<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
Require all granted
<tmpl_else>
Order allow,deny
Allow from all
</tmpl_if>
</Directory>
NameVirtualHost *:80
NameVirtualHost *:443
<tmpl_loop name="ip_adresses">
NameVirtualHost {tmpl_var name="ip_address"}:{tmpl_var name="port"}
</tmpl_loop>
server/lib/classes/system.inc.php
View file @
659b5a40
...
...
@@ -1840,17 +1840,17 @@ class system{
if
(
$this
->
is_mounted
(
$backup_dir
)){
exec
(
$mount_cmd
);
sleep
(
1
);
}
}
$unmounted
=
$this
->
is_mounted
(
$backup_dir
)
==
0
?
true
:
false
;
if
(
!
$unmounted
)
{
//* send email to admin that backup directory could not be unmounted
$global_config
=
$app
->
getconf
->
get_global_config
(
'mail'
);
if
(
$global_config
[
'admin_mail'
]
!=
''
){
$subject
=
'Backup directory '
.
$backup_dir
.
' could not be unmounted'
;
$message
=
"Backup directory "
.
$backup_dir
.
" could not be unmounted.
\n\n
The command
\n\n
"
.
$mount_cmd
.
"
\n\n
failed."
;
mail
(
$global_config
[
'admin_mail'
],
$subject
,
$message
);
$unmounted
=
$this
->
is_mounted
(
$backup_dir
)
==
0
?
true
:
false
;
if
(
!
$unmounted
)
{
//* send email to admin that backup directory could not be unmounted
$global_config
=
$app
->
getconf
->
get_global_config
(
'mail'
);
if
(
$global_config
[
'admin_mail'
]
!=
''
){
$subject
=
'Backup directory '
.
$backup_dir
.
' could not be unmounted'
;
$message
=
"Backup directory "
.
$backup_dir
.
" could not be unmounted.
\n\n
The command
\n\n
"
.
$mount_cmd
.
"
\n\n
failed."
;
mail
(
$global_config
[
'admin_mail'
],
$subject
,
$message
);
}
}
}
}
...
...
server/scripts/ispconfig_update.sh
View file @
659b5a40
#!/bin/bash
php
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
/usr/local/ispconfig/server/scripts/ispconfig_update.php
_UPD
=
1
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
# padding handles script being overwritten during updates
# see https://git.ispconfig.org/ispconfig/ispconfig3/issues/4227
{
if
[
-n
"
${
_UPD
}
"
]
then
n
=
$(
readlink
-f
${
0
}
)
if
[
"
$(
basename
${
0
}
)
"
==
"ispconfig_update.sh"
]
then
cp
-p
${
n
}
${
n
}
.exec
chmod
+x
${
n
}
.exec
exec
${
n
}
.exec
else
# clean up tmp .exec file
if
[
"
$(
basename
${
0
}
)
"
==
"ispconfig_update.sh.exec"
]
;
then
rm
-f
${
0
}
fi
exec
php
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
/usr/local/ispconfig/server/scripts/ispconfig_update.php
fi
fi
}
server/scripts/update_stable.sh
View file @
659b5a40
#!/bin/bash
{
{
umask
0077
\
&&
tmpdir
=
`
mktemp
-dt
"
$(
basename
$0
)
.XXXXXXXXXX"
`
\
&&
test
-d
"
${
tmpdir
}
"
\
&&
cd
"
${
tmpdir
}
"
}
||
{
echo
'mktemp failed'
exit
1
}
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
if
[
-f
ISPConfig-3-stable.tar.gz
]
_UPD
=
1
# padding handles script being overwritten during updates
# see https://git.ispconfig.org/ispconfig/ispconfig3/issues/4227
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
##################################################
{
if
[
-n
"
${
_UPD
}
"
]
then
tar
xvfz ISPConfig-3-stable.tar.gz
cd
ispconfig3_install/install/
php
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
update.php
cd
/tmp
rm
-rf
"
${
tmpdir
}
"
else
echo
"Unable to download the update."
exit
1
{
umask
0077
\
&&
tmpdir
=
`
mktemp
-dt
"
$(
basename
$0
)
.XXXXXXXXXX"
`
\
&&
test
-d
"
${
tmpdir
}
"
\
&&
cd
"
${
tmpdir
}
"
}
||
{
echo
'mktemp failed'
exit
1
}
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
if
[
-f
ISPConfig-3-stable.tar.gz
]
then
tar
xvfz ISPConfig-3-stable.tar.gz
cd
ispconfig3_install/install/
php
-q
\
-d
disable_classes
=
\
-d
disable_functions
=
\
-d
open_basedir
=
\
update.php
cd
/tmp
rm
-rf
"
${
tmpdir
}
"
else
echo
"Unable to download the update."
exit
1
fi
fi
exit
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment