Vaguement :
- correction de qques identation (et surement rajout d'erreur) - supression de apache 1 (c'est plus maintenu, on va pas s'étaler) - suppression du mass vhosting - corrections de bugs divers et varié
This commit is contained in:
parent
68d7a7dd15
commit
4e0f98b93e
|
@ -349,8 +349,6 @@ debian/po/templates.pot -text
|
||||||
debian/rules -text
|
debian/rules -text
|
||||||
debian/templates -text
|
debian/templates -text
|
||||||
etc/alternc/alternc.ini -text
|
etc/alternc/alternc.ini -text
|
||||||
etc/alternc/apache-ssl.conf -text
|
|
||||||
etc/alternc/apache.conf -text
|
|
||||||
etc/alternc/apache2-ssl.conf -text
|
etc/alternc/apache2-ssl.conf -text
|
||||||
etc/alternc/apache2.conf -text
|
etc/alternc/apache2.conf -text
|
||||||
etc/alternc/functions_hosting/hosting_massvhost.sh -text
|
etc/alternc/functions_hosting/hosting_massvhost.sh -text
|
||||||
|
@ -396,9 +394,7 @@ install/mysql.sql -text
|
||||||
install/newone.php -text
|
install/newone.php -text
|
||||||
install/reset_root.php -text
|
install/reset_root.php -text
|
||||||
install/upgrade_check.sh -text
|
install/upgrade_check.sh -text
|
||||||
install/upgrades/0.9.1.sh -text
|
|
||||||
install/upgrades/0.9.1.sql -text
|
install/upgrades/0.9.1.sql -text
|
||||||
install/upgrades/0.9.10.sh -text
|
|
||||||
install/upgrades/0.9.10.sql -text
|
install/upgrades/0.9.10.sql -text
|
||||||
install/upgrades/0.9.1_migrationldap.php -text
|
install/upgrades/0.9.1_migrationldap.php -text
|
||||||
install/upgrades/0.9.2.php -text
|
install/upgrades/0.9.2.php -text
|
||||||
|
@ -434,7 +430,6 @@ src/Makefile -text
|
||||||
src/alternc-check -text
|
src/alternc-check -text
|
||||||
src/alternc-passwd -text
|
src/alternc-passwd -text
|
||||||
src/alternc_reload -text
|
src/alternc_reload -text
|
||||||
src/basedir_prot.sh -text
|
|
||||||
src/du.pl -text
|
src/du.pl -text
|
||||||
src/fixperms.sh -text
|
src/fixperms.sh -text
|
||||||
src/functions.sh -text
|
src/functions.sh -text
|
||||||
|
|
|
@ -65,7 +65,7 @@ function dnsoff() {
|
||||||
</script>
|
</script>
|
||||||
<h3><?php printf(_("Editing subdomains of %s"),$domain); ?></h3>
|
<h3><?php printf(_("Editing subdomains of %s"),$domain); ?></h3>
|
||||||
<?php
|
<?php
|
||||||
if ($error) {
|
if (isset($error) && $error) {
|
||||||
echo "<p class=\"error\">$error</p>";
|
echo "<p class=\"error\">$error</p>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -57,7 +57,7 @@ if (!isset($restrictip)) {
|
||||||
<p id="logo"> <img src="logo.png" border="0" alt="<?php __("Web Hosting Control Panel"); ?>" title="<?php __("Web Hosting Control Panel"); ?>" /></a>
|
<p id="logo"> <img src="logo.png" border="0" alt="<?php __("Web Hosting Control Panel"); ?>" title="<?php __("Web Hosting Control Panel"); ?>" /></a>
|
||||||
</p>
|
</p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<?php if ($error) echo "<font color=red>$error</font>"; ?>
|
<?php if (isset($error) && $error) echo "<font color=red>$error</font>"; ?>
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
if (!$_SERVER[HTTPS]) {
|
if (!$_SERVER[HTTPS]) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ if (ini_get("safe_mode")) {
|
||||||
|
|
||||||
// For people who want to authenticate with HTTP AUTH
|
// For people who want to authenticate with HTTP AUTH
|
||||||
if (isset($_GET['http_auth'])) $http_auth=strval($_GET['http_auth']);
|
if (isset($_GET['http_auth'])) $http_auth=strval($_GET['http_auth']);
|
||||||
if ($http_auth) {
|
if (isset($http_auth) && $http_auth) {
|
||||||
if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) {
|
if (empty($_SERVER['PHP_AUTH_USER']) || empty($_SERVER['PHP_AUTH_PW'])) {
|
||||||
header('WWW-Authenticate: Basic realm="Test Authentication System"');
|
header('WWW-Authenticate: Basic realm="Test Authentication System"');
|
||||||
header('HTTP/1.0 401 Unauthorized');
|
header('HTTP/1.0 401 Unauthorized');
|
||||||
|
@ -93,7 +93,7 @@ require_once($root."class/functions.php");
|
||||||
require_once($root."class/variables.php");
|
require_once($root."class/variables.php");
|
||||||
|
|
||||||
// Redirection si appel à https://(!fqdn)/
|
// Redirection si appel à https://(!fqdn)/
|
||||||
if ($_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) {
|
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"]=="on" && $host!=$L_FQDN) {
|
||||||
header("Location: https://$L_FQDN/");
|
header("Location: https://$L_FQDN/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -723,6 +723,7 @@ EOF;
|
||||||
" HAVING status=2 or status=3 ORDER BY status DESC, expiry;"))
|
" HAVING status=2 or status=3 ORDER BY status DESC, expiry;"))
|
||||||
return false;
|
return false;
|
||||||
else {
|
else {
|
||||||
|
$res=array();
|
||||||
while($db->next_record())
|
while($db->next_record())
|
||||||
$res[] = $db->Record;
|
$res[] = $db->Record;
|
||||||
return $res;
|
return $res;
|
||||||
|
|
|
@ -66,7 +66,7 @@ class m_dom {
|
||||||
*/
|
*/
|
||||||
var $islocked=false;
|
var $islocked=false;
|
||||||
|
|
||||||
var $type_local = "LOCAL";
|
var $type_local = "VHOST";
|
||||||
var $type_url = "URL";
|
var $type_url = "URL";
|
||||||
var $type_ip = "IP";
|
var $type_ip = "IP";
|
||||||
var $type_webmail = "WEBMAIL";
|
var $type_webmail = "WEBMAIL";
|
||||||
|
@ -669,7 +669,7 @@ class m_dom {
|
||||||
$r["dns_result"]=$db->Record["dns_result"];
|
$r["dns_result"]=$db->Record["dns_result"];
|
||||||
$r["mail"]=$db->Record["gesmx"];
|
$r["mail"]=$db->Record["gesmx"];
|
||||||
$r["mx"]=$db->Record["mx"];
|
$r["mx"]=$db->Record["mx"];
|
||||||
$r[noerase]=$db->Record[noerase];
|
$r['noerase']=$db->Record['noerase'];
|
||||||
$db->free();
|
$db->free();
|
||||||
$db->query("select count(*) as cnt from sub_domaines where compte='$cuid' and domaine='$dom'");
|
$db->query("select count(*) as cnt from sub_domaines where compte='$cuid' and domaine='$dom'");
|
||||||
$db->next_record();
|
$db->next_record();
|
||||||
|
@ -754,6 +754,8 @@ class m_dom {
|
||||||
|
|
||||||
|
|
||||||
function check_type_value($type, $value) {
|
function check_type_value($type, $value) {
|
||||||
|
global $db,$err,$cuid;
|
||||||
|
|
||||||
// check the type we can have in domaines_type.target
|
// check the type we can have in domaines_type.target
|
||||||
|
|
||||||
switch ($this->domains_type_target_values($type)) {
|
switch ($this->domains_type_target_values($type)) {
|
||||||
|
|
|
@ -488,7 +488,7 @@ Cordialement.
|
||||||
*/
|
*/
|
||||||
function show_help($file,$force=false) {
|
function show_help($file,$force=false) {
|
||||||
global $err;
|
global $err;
|
||||||
$err->log("mem","show_help",$show);
|
$err->log("mem","show_help");
|
||||||
if ($this->user["show_help"] || $force) {
|
if ($this->user["show_help"] || $force) {
|
||||||
$hlp=_("hlp_$file");
|
$hlp=_("hlp_$file");
|
||||||
if ($hlp!="hlp_$file") {
|
if ($hlp!="hlp_$file") {
|
||||||
|
|
|
@ -5,7 +5,6 @@ alternc-slave: setuid-binary usr/lib/alternc/mem_add 4750 root/www-data
|
||||||
alternc-slave: setuid-binary usr/lib/alternc/mem_del 4750 root/www-data
|
alternc-slave: setuid-binary usr/lib/alternc/mem_del 4750 root/www-data
|
||||||
alternc-slave: setuid-binary usr/lib/alternc/quota_edit 4750 root/www-data
|
alternc-slave: setuid-binary usr/lib/alternc/quota_edit 4750 root/www-data
|
||||||
alternc-slave: setuid-binary usr/lib/alternc/quota_get 4750 root/www-data
|
alternc-slave: setuid-binary usr/lib/alternc/quota_get 4750 root/www-data
|
||||||
alternc-slave: executable-is-not-world-readable usr/lib/alternc/basedir_prot.sh 0750 != 0755
|
|
||||||
alternc-slave: executable-is-not-world-readable usr/lib/alternc/du.pl 4750
|
alternc-slave: executable-is-not-world-readable usr/lib/alternc/du.pl 4750
|
||||||
alternc-slave: executable-is-not-world-readable usr/lib/alternc/fixperms.sh 0750 != 0755
|
alternc-slave: executable-is-not-world-readable usr/lib/alternc/fixperms.sh 0750 != 0755
|
||||||
alternc-slave: executable-is-not-world-readable usr/lib/alternc/mail_add 4750
|
alternc-slave: executable-is-not-world-readable usr/lib/alternc/mail_add 4750
|
||||||
|
|
|
@ -17,123 +17,13 @@ usr/share/locale/fr/LC_MESSAGES
|
||||||
usr/share/lintian/overrides/
|
usr/share/lintian/overrides/
|
||||||
var/alternc/apache-vhost
|
var/alternc/apache-vhost
|
||||||
var/alternc/apacheconf
|
var/alternc/apacheconf
|
||||||
var/alternc/apacheconf/_
|
|
||||||
var/alternc/apacheconf/0
|
|
||||||
var/alternc/apacheconf/1
|
|
||||||
var/alternc/apacheconf/2
|
|
||||||
var/alternc/apacheconf/3
|
|
||||||
var/alternc/apacheconf/4
|
|
||||||
var/alternc/apacheconf/5
|
|
||||||
var/alternc/apacheconf/6
|
|
||||||
var/alternc/apacheconf/7
|
|
||||||
var/alternc/apacheconf/8
|
|
||||||
var/alternc/apacheconf/9
|
|
||||||
var/alternc/apacheconf/a
|
|
||||||
var/alternc/apacheconf/b
|
|
||||||
var/alternc/apacheconf/c
|
|
||||||
var/alternc/apacheconf/d
|
|
||||||
var/alternc/apacheconf/e
|
|
||||||
var/alternc/apacheconf/f
|
|
||||||
var/alternc/apacheconf/g
|
|
||||||
var/alternc/apacheconf/h
|
|
||||||
var/alternc/apacheconf/i
|
|
||||||
var/alternc/apacheconf/j
|
|
||||||
var/alternc/apacheconf/k
|
|
||||||
var/alternc/apacheconf/l
|
|
||||||
var/alternc/apacheconf/m
|
|
||||||
var/alternc/apacheconf/n
|
|
||||||
var/alternc/apacheconf/o
|
|
||||||
var/alternc/apacheconf/p
|
|
||||||
var/alternc/apacheconf/q
|
|
||||||
var/alternc/apacheconf/r
|
|
||||||
var/alternc/apacheconf/s
|
|
||||||
var/alternc/apacheconf/t
|
|
||||||
var/alternc/apacheconf/u
|
|
||||||
var/alternc/apacheconf/v
|
|
||||||
var/alternc/apacheconf/w
|
|
||||||
var/alternc/apacheconf/x
|
|
||||||
var/alternc/apacheconf/y
|
|
||||||
var/alternc/apacheconf/z
|
|
||||||
var/alternc/bind
|
var/alternc/bind
|
||||||
var/alternc/bind/zones
|
var/alternc/bind/zones
|
||||||
var/alternc/bureau
|
var/alternc/bureau
|
||||||
var/alternc/cgi-bin
|
var/alternc/cgi-bin
|
||||||
var/alternc/db
|
var/alternc/db
|
||||||
var/alternc/dns
|
var/alternc/dns
|
||||||
var/alternc/dns/_
|
var/alternc/dns/redir/
|
||||||
var/alternc/dns/0
|
|
||||||
var/alternc/dns/1
|
|
||||||
var/alternc/dns/2
|
|
||||||
var/alternc/dns/3
|
|
||||||
var/alternc/dns/4
|
|
||||||
var/alternc/dns/5
|
|
||||||
var/alternc/dns/6
|
|
||||||
var/alternc/dns/7
|
|
||||||
var/alternc/dns/8
|
|
||||||
var/alternc/dns/9
|
|
||||||
var/alternc/dns/a
|
|
||||||
var/alternc/dns/b
|
|
||||||
var/alternc/dns/c
|
|
||||||
var/alternc/dns/d
|
|
||||||
var/alternc/dns/e
|
|
||||||
var/alternc/dns/f
|
|
||||||
var/alternc/dns/g
|
|
||||||
var/alternc/dns/h
|
|
||||||
var/alternc/dns/i
|
|
||||||
var/alternc/dns/j
|
|
||||||
var/alternc/dns/k
|
|
||||||
var/alternc/dns/l
|
|
||||||
var/alternc/dns/m
|
|
||||||
var/alternc/dns/n
|
|
||||||
var/alternc/dns/o
|
|
||||||
var/alternc/dns/p
|
|
||||||
var/alternc/dns/q
|
|
||||||
var/alternc/dns/r
|
|
||||||
var/alternc/dns/redir/_
|
|
||||||
var/alternc/dns/redir/0
|
|
||||||
var/alternc/dns/redir/1
|
|
||||||
var/alternc/dns/redir/2
|
|
||||||
var/alternc/dns/redir/3
|
|
||||||
var/alternc/dns/redir/4
|
|
||||||
var/alternc/dns/redir/5
|
|
||||||
var/alternc/dns/redir/6
|
|
||||||
var/alternc/dns/redir/7
|
|
||||||
var/alternc/dns/redir/8
|
|
||||||
var/alternc/dns/redir/9
|
|
||||||
var/alternc/dns/redir/a
|
|
||||||
var/alternc/dns/redir/b
|
|
||||||
var/alternc/dns/redir/c
|
|
||||||
var/alternc/dns/redir/d
|
|
||||||
var/alternc/dns/redir/e
|
|
||||||
var/alternc/dns/redir/f
|
|
||||||
var/alternc/dns/redir/g
|
|
||||||
var/alternc/dns/redir/h
|
|
||||||
var/alternc/dns/redir/i
|
|
||||||
var/alternc/dns/redir/j
|
|
||||||
var/alternc/dns/redir/k
|
|
||||||
var/alternc/dns/redir/l
|
|
||||||
var/alternc/dns/redir/m
|
|
||||||
var/alternc/dns/redir/n
|
|
||||||
var/alternc/dns/redir/o
|
|
||||||
var/alternc/dns/redir/p
|
|
||||||
var/alternc/dns/redir/q
|
|
||||||
var/alternc/dns/redir/r
|
|
||||||
var/alternc/dns/redir/s
|
|
||||||
var/alternc/dns/redir/t
|
|
||||||
var/alternc/dns/redir/u
|
|
||||||
var/alternc/dns/redir/v
|
|
||||||
var/alternc/dns/redir/w
|
|
||||||
var/alternc/dns/redir/x
|
|
||||||
var/alternc/dns/redir/y
|
|
||||||
var/alternc/dns/redir/z
|
|
||||||
var/alternc/dns/s
|
|
||||||
var/alternc/dns/t
|
|
||||||
var/alternc/dns/u
|
|
||||||
var/alternc/dns/v
|
|
||||||
var/alternc/dns/w
|
|
||||||
var/alternc/dns/x
|
|
||||||
var/alternc/dns/y
|
|
||||||
var/alternc/dns/z
|
|
||||||
var/alternc/exec.usr
|
var/alternc/exec.usr
|
||||||
var/alternc/html
|
var/alternc/html
|
||||||
var/alternc/html/_
|
var/alternc/html/_
|
||||||
|
|
|
@ -11,7 +11,6 @@ alternc: setuid-binary usr/lib/alternc/db_create 4750 root/www-data
|
||||||
alternc: setuid-binary usr/lib/alternc/du.pl 4750 root/www-data
|
alternc: setuid-binary usr/lib/alternc/du.pl 4750 root/www-data
|
||||||
alternc: non-standard-executable-perm usr/lib/alternc/quota_edit.sh 0750 != 0755
|
alternc: non-standard-executable-perm usr/lib/alternc/quota_edit.sh 0750 != 0755
|
||||||
alternc: non-standard-executable-perm usr/lib/alternc/quota_get.sh 0750 != 0755
|
alternc: non-standard-executable-perm usr/lib/alternc/quota_get.sh 0750 != 0755
|
||||||
alternc: non-standard-executable-perm usr/lib/alternc/basedir_prot.sh 0750 != 0755
|
|
||||||
alternc: non-standard-executable-perm usr/lib/alternc/sqlbackup.sh 0750 != 0755
|
alternc: non-standard-executable-perm usr/lib/alternc/sqlbackup.sh 0750 != 0755
|
||||||
alternc: non-standard-executable-perm usr/lib/alternc/rawstat.daily 0750 != 0755
|
alternc: non-standard-executable-perm usr/lib/alternc/rawstat.daily 0750 != 0755
|
||||||
alternc: non-standard-executable-perm usr/lib/alternc/quota_init 0750 != 0755
|
alternc: non-standard-executable-perm usr/lib/alternc/quota_init 0750 != 0755
|
||||||
|
@ -41,7 +40,6 @@ alternc: executable-is-not-world-readable usr/lib/alternc/functions_hosting.sh 0
|
||||||
alternc: executable-is-not-world-readable usr/lib/alternc/functions_dns.sh 0750 != 0755
|
alternc: executable-is-not-world-readable usr/lib/alternc/functions_dns.sh 0750 != 0755
|
||||||
alternc: executable-is-not-world-readable usr/lib/alternc/du.pl 4750
|
alternc: executable-is-not-world-readable usr/lib/alternc/du.pl 4750
|
||||||
alternc: executable-is-not-world-readable usr/lib/alternc/quota_init 0750 != 0755
|
alternc: executable-is-not-world-readable usr/lib/alternc/quota_init 0750 != 0755
|
||||||
alternc: executable-is-not-world-readable usr/lib/alternc/basedir_prot.sh 0750 != 0755
|
|
||||||
alternc: executable-is-not-world-readable usr/lib/alternc/spoolsize.php 0750 != 0755
|
alternc: executable-is-not-world-readable usr/lib/alternc/spoolsize.php 0750 != 0755
|
||||||
alternc: executable-is-not-world-readable usr/lib/alternc/rawstat.daily 0750 != 0755
|
alternc: executable-is-not-world-readable usr/lib/alternc/rawstat.daily 0750 != 0755
|
||||||
alternc: using-first-person-in-templates alternc/monitor_ip
|
alternc: using-first-person-in-templates alternc/monitor_ip
|
||||||
|
|
|
@ -192,7 +192,6 @@ EOF
|
||||||
# They will be regenerated without the bug by upgrade_check.sh below.
|
# They will be regenerated without the bug by upgrade_check.sh below.
|
||||||
if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then
|
if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then
|
||||||
rm -f /var/alternc/apacheconf/*/*
|
rm -f /var/alternc/apacheconf/*/*
|
||||||
rm -f /var/alternc/apacheconf/override_php.conf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "checking for upgrades"
|
echo "checking for upgrades"
|
||||||
|
@ -214,12 +213,6 @@ EOF
|
||||||
#clean old access to the management panel
|
#clean old access to the management panel
|
||||||
find /var/alternc/dns/ -type l -lname /var/alternc/bureau -exec rm {} \;
|
find /var/alternc/dns/ -type l -lname /var/alternc/bureau -exec rm {} \;
|
||||||
|
|
||||||
# Add access to the management panel
|
|
||||||
PUBLIC_IP_C=$(echo $PUBLIC_IP|cut -c 1)
|
|
||||||
ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN
|
|
||||||
mkdir -p /var/alternc/dns/$PUBLIC_IP_C
|
|
||||||
ln -nsf /var/alternc/bureau /var/alternc/dns/$PUBLIC_IP_C/$PUBLIC_IP
|
|
||||||
|
|
||||||
# Bind stuff
|
# Bind stuff
|
||||||
touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
|
touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
|
||||||
chown root:bind /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
|
chown root:bind /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
|
||||||
|
@ -227,7 +220,6 @@ EOF
|
||||||
touch /var/run/alternc/refresh_slave
|
touch /var/run/alternc/refresh_slave
|
||||||
/usr/lib/alternc/slave_dns
|
/usr/lib/alternc/slave_dns
|
||||||
# Apache will not start without this file
|
# Apache will not start without this file
|
||||||
touch /var/alternc/apacheconf/override_php.conf
|
|
||||||
touch /var/alternc/apache-vhost/vhosts_all.conf
|
touch /var/alternc/apache-vhost/vhosts_all.conf
|
||||||
|
|
||||||
# Update l18n files
|
# Update l18n files
|
||||||
|
@ -239,9 +231,6 @@ EOF
|
||||||
echo "running alternc.install"
|
echo "running alternc.install"
|
||||||
alternc.install
|
alternc.install
|
||||||
|
|
||||||
# Add basedir protection
|
|
||||||
/usr/lib/alternc/basedir_prot.sh
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
|
@ -61,7 +61,7 @@ install: build
|
||||||
chown -R www-data:www-data debian/alternc/var/alternc/dns debian/alternc/var/alternc/html debian/alternc/var/run/alternc debian/alternc/var/log/alternc debian/alternc/var/alternc/tmp
|
chown -R www-data:www-data debian/alternc/var/alternc/dns debian/alternc/var/alternc/html debian/alternc/var/run/alternc debian/alternc/var/log/alternc debian/alternc/var/alternc/tmp
|
||||||
chmod a+x debian/alternc/usr/share/alternc/install/alternc.install debian/alternc/usr/share/alternc/install/dopo.sh debian/alternc/usr/share/alternc/install/mysql.sh debian/alternc/usr/share/alternc/install/newone.php debian/alternc/usr/share/alternc/install/reset_root.php debian/alternc/usr/share/alternc/install/upgrade_check.sh debian/alternc/usr/share/alternc/install/upgrades/*.php debian/alternc/usr/share/alternc/install/upgrades/*.sh
|
chmod a+x debian/alternc/usr/share/alternc/install/alternc.install debian/alternc/usr/share/alternc/install/dopo.sh debian/alternc/usr/share/alternc/install/mysql.sh debian/alternc/usr/share/alternc/install/newone.php debian/alternc/usr/share/alternc/install/reset_root.php debian/alternc/usr/share/alternc/install/upgrade_check.sh debian/alternc/usr/share/alternc/install/upgrades/*.php debian/alternc/usr/share/alternc/install/upgrades/*.sh
|
||||||
|
|
||||||
for sub in dns dns/redir mail html apacheconf; do \
|
for sub in mail html ; do \
|
||||||
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z _ 0 1 2 3 4 5 6 7 8 9; do \
|
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z _ 0 1 2 3 4 5 6 7 8 9; do \
|
||||||
mkdir -p debian/alternc/var/alternc/${sub}/${i} ;\
|
mkdir -p debian/alternc/var/alternc/${sub}/${i} ;\
|
||||||
chown www-data debian/alternc/var/alternc/${sub}/${i} ;\
|
chown www-data debian/alternc/var/alternc/${sub}/${i} ;\
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<VirtualHost *:443>
|
|
||||||
SSLEnable
|
|
||||||
SSLRequireSSL
|
|
||||||
DocumentRoot /var/alternc/bureau
|
|
||||||
Include /etc/alternc/bureau.conf
|
|
||||||
</VirtualHost>
|
|
|
@ -1,42 +0,0 @@
|
||||||
# This module is loaded in /etc/apache/modules, and enabled by apache-modconf
|
|
||||||
# LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
|
|
||||||
|
|
||||||
ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
|
|
||||||
|
|
||||||
<Directory /var/alternc/cgi-bin/>
|
|
||||||
Options FollowSymLinks IncludesNOEXEC ExecCGI
|
|
||||||
AllowOverride None
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
AddHandler cgi-script .cgi
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<VirtualHost *:80>
|
|
||||||
# ***ALTERNC_ALIASES***
|
|
||||||
Alias /icons/ /usr/share/apache/icons/
|
|
||||||
|
|
||||||
UseCanonicalName Off
|
|
||||||
VirtualDocumentRoot /var/alternc/dns/%-2.1/%0
|
|
||||||
|
|
||||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
|
||||||
CustomLog /var/log/apache/access.log alternc
|
|
||||||
</VirtualHost>
|
|
||||||
|
|
||||||
<Directory /var/alternc>
|
|
||||||
AllowOverride AuthConfig FileInfo
|
|
||||||
Options Indexes Includes FollowSymLinks MultiViews
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
php_admin_flag safe_mode_gid on
|
|
||||||
php_admin_flag safe_mode on
|
|
||||||
php_admin_value disable_functions chmod,chown,chgrp,link,symlink
|
|
||||||
php_admin_value safe_mode_exec_dir /var/alternc/exec.usr
|
|
||||||
php_admin_value disable_functions chgrp,link,symlink
|
|
||||||
|
|
||||||
php_admin_flag enable_dl off
|
|
||||||
php_admin_value upload_tmp_dir /var/alternc/tmp
|
|
||||||
php_admin_value sendmail_path /usr/lib/alternc/sendmail
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
Include /etc/alternc/bureau.conf
|
|
||||||
Include /var/alternc/apache-vhost/vhosts_all.conf
|
|
|
@ -11,12 +11,27 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
|
||||||
AddHandler cgi-script .cgi
|
AddHandler cgi-script .cgi
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
|
||||||
<Directory /var/alternc>
|
<Directory /var/alternc>
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from none
|
Allow from none
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /var/alternc/html>
|
||||||
|
AllowOverride AuthConfig FileInfo Limit Options Indexes
|
||||||
|
Options Indexes Includes FollowSymLinks MultiViews
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
php_admin_flag safe_mode_gid on
|
||||||
|
php_admin_flag safe_mode on
|
||||||
|
php_admin_value disable_functions chmod,chown,chgrp,link,symlink
|
||||||
|
php_admin_value safe_mode_exec_dir /var/alternc/exec.usr
|
||||||
|
php_admin_value disable_functions chgrp,link,symlink
|
||||||
|
|
||||||
|
php_admin_flag enable_dl off
|
||||||
|
php_admin_value upload_tmp_dir /var/alternc/tmp
|
||||||
|
php_admin_value sendmail_path /usr/lib/alternc/sendmail
|
||||||
|
</Directory>
|
||||||
|
|
||||||
<Directory /usr/share/phpmyadmin>
|
<Directory /usr/share/phpmyadmin>
|
||||||
AllowOverride AuthConfig Options FileInfo Limit Indexes
|
AllowOverride AuthConfig Options FileInfo Limit Indexes
|
||||||
Options Indexes Includes FollowSymLinks MultiViews
|
Options Indexes Includes FollowSymLinks MultiViews
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory /var/alternc/bureau>
|
<Directory /var/alternc/bureau>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
php_admin_flag safe_mode_gid off
|
php_admin_flag safe_mode_gid off
|
||||||
php_admin_flag safe_mode off
|
php_admin_flag safe_mode off
|
||||||
php_admin_flag register_globals on
|
php_admin_flag register_globals on
|
||||||
|
|
|
@ -10,10 +10,16 @@
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
</Directory>
|
</Directory>
|
||||||
<Directory /var/alternc/bureau>
|
<Directory /var/alternc/bureau>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
|
||||||
php_admin_flag safe_mode_gid off
|
php_admin_flag safe_mode_gid off
|
||||||
php_admin_flag safe_mode off
|
php_admin_flag safe_mode off
|
||||||
php_admin_flag register_globals on
|
php_admin_flag register_globals on
|
||||||
AddDefaultCharset ISO-8859-1
|
AddDefaultCharset ISO-8859-1
|
||||||
php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/
|
php_admin_value open_basedir /etc/alternc/:/var/run/alternc/:/var/alternc/bureau/:/var/alternc/html/:/var/alternc/tmp:/tmp:/usr/share/php/:/var/cache/alternc-webalizer/
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
<Virtualhost *:80>
|
<Virtualhost *:80>
|
||||||
|
|
||||||
ServerName %%fqdn%%
|
ServerName %%fqdn%%
|
||||||
|
|
||||||
KeepAlive Off
|
KeepAlive Off
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteRule ^/(.*)$ %%redirect%%/$1 [R=301,L]
|
RewriteRule ^/(.*)$ %%redirect%%/$1 [R=301,L]
|
||||||
|
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</Virtualhost>
|
</Virtualhost>
|
||||||
|
|
|
@ -6,20 +6,6 @@
|
||||||
php_admin_value open_basedir "%%document_root%%:/usr/share/php/:/var/alternc/tmp:/tmp"
|
php_admin_value open_basedir "%%document_root%%:/usr/share/php/:/var/alternc/tmp:/tmp"
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
AllowOverride AuthConfig FileInfo Limit Options Indexes
|
|
||||||
Options Indexes Includes FollowSymLinks MultiViews
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
php_admin_flag safe_mode_gid on
|
|
||||||
php_admin_flag safe_mode on
|
|
||||||
php_admin_value disable_functions chmod,chown,chgrp,link,symlink
|
|
||||||
php_admin_value safe_mode_exec_dir /var/alternc/exec.usr
|
|
||||||
php_admin_value disable_functions chgrp,link,symlink
|
|
||||||
|
|
||||||
php_admin_flag enable_dl off
|
|
||||||
php_admin_value upload_tmp_dir /var/alternc/tmp
|
|
||||||
php_admin_value sendmail_path /usr/lib/alternc/sendmail
|
|
||||||
|
|
||||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
CustomLog /var/log/apache2/access.log alternc
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
|
@ -8,4 +8,7 @@
|
||||||
php_admin_flag safe_mode off
|
php_admin_flag safe_mode off
|
||||||
Options Indexes FollowSymLinks
|
Options Indexes FollowSymLinks
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{Host}i" alternc
|
||||||
|
CustomLog /var/log/apache2/access.log alternc
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
|
@ -210,10 +210,6 @@ then
|
||||||
ln -sf /etc/alternc/apache.conf /etc/apache/conf.d/alternc.conf
|
ln -sf /etc/alternc/apache.conf /etc/apache/conf.d/alternc.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch /var/alternc/apacheconf/override_php.conf
|
|
||||||
if [ ! -h /etc/apache/conf.d/override_php.conf ] && [ -e /etc/apache/conf.d/ ]; then
|
|
||||||
ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache/conf.d/override_php.conf
|
|
||||||
fi
|
|
||||||
SERVICES="$SERVICES apache apache-ssl"
|
SERVICES="$SERVICES apache apache-ssl"
|
||||||
fi
|
fi
|
||||||
if [ -x /usr/sbin/apache2 ]; then
|
if [ -x /usr/sbin/apache2 ]; then
|
||||||
|
@ -251,10 +247,6 @@ if [ -x /usr/sbin/apache2 ]; then
|
||||||
ln -sf /etc/alternc/apache2.conf /etc/apache2/conf.d/alternc.conf
|
ln -sf /etc/alternc/apache2.conf /etc/apache2/conf.d/alternc.conf
|
||||||
s="apache2"
|
s="apache2"
|
||||||
fi
|
fi
|
||||||
if [ ! -h /etc/apache2/conf.d/override_php.conf ] && [ -e /etc/apache2/conf.d/ ]; then
|
|
||||||
ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache2/conf.d/override_php.conf
|
|
||||||
s="apache2"
|
|
||||||
fi
|
|
||||||
if [ -e /etc/apache2/sites-enabled/000-default ]; then
|
if [ -e /etc/apache2/sites-enabled/000-default ]; then
|
||||||
a2dissite default
|
a2dissite default
|
||||||
s="apache2"
|
s="apache2"
|
||||||
|
@ -338,9 +330,6 @@ done
|
||||||
# Last touches
|
# Last touches
|
||||||
#
|
#
|
||||||
|
|
||||||
ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN
|
|
||||||
ln -nsf /var/alternc/bureau /var/alternc/dns/$PUBLIC_IP_BEGIN/$PUBLIC_IP
|
|
||||||
|
|
||||||
|
|
||||||
# Creating admin user if needed
|
# Creating admin user if needed
|
||||||
HAS_ROOT=`mysql --defaults-file=/etc/alternc/my.cnf -e "SELECT COUNT(*) FROM membres WHERE login = 'admin' OR login = 'root' and su = 1" | tail -1`
|
HAS_ROOT=`mysql --defaults-file=/etc/alternc/my.cnf -e "SELECT COUNT(*) FROM membres WHERE login = 'admin' OR login = 'root' and su = 1" | tail -1`
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# protect all domains, not just new ones
|
|
||||||
. /usr/lib/alternc/basedir_prot.sh
|
|
||||||
|
|
||||||
servers="apache-ssl apache"
|
|
||||||
for server in $servers; do
|
|
||||||
|
|
||||||
includefile=/var/alternc/apacheconf/override_php.conf
|
|
||||||
. /usr/share/wwwconfig-common/apache-include_all.sh
|
|
||||||
[ "$status" = "uncomment" -o "$status" = "include" ] && restart="$server $restart"
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
. /usr/share/wwwconfig-common/restart.sh
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# We load local.sh
|
|
||||||
. /etc/alternc/local.sh
|
|
||||||
|
|
||||||
find ${ALTERNC_LOC}/dns -lname "${ALTERNC_LOC}/dns/redir/mail" -print -exec rm -f '{}' \; -exec ln -sf ${ALTERNC_LOC}/bureau/admin/webmail '{}' \;
|
|
||||||
|
|
||||||
rm -rf ${ALTERNC_LOC}/apacheconf
|
|
||||||
/usr/lib/alternc/basedir_prot.sh
|
|
||||||
|
|
||||||
# if apache exists we reload
|
|
||||||
if [ -x /etc/init.d/apache ] ; then
|
|
||||||
invoke-rc.d apache reload
|
|
||||||
invoke-rc.d apache-ssl reload
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if apache2 exists we reload
|
|
||||||
if [ -x /etc/init.d/apache2 ] ; then
|
|
||||||
invoke-rc.d apache2 force-reload
|
|
||||||
fi
|
|
|
@ -26,7 +26,7 @@
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del
|
SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del
|
||||||
SCRIPTS=quota_edit.sh quota_get.sh basedir_prot.sh sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh
|
SCRIPTS=quota_edit.sh quota_get.sh sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh
|
||||||
LIBS=functions.sh functions_hosting.sh functions_dns.sh
|
LIBS=functions.sh functions_hosting.sh functions_dns.sh
|
||||||
BIN=$(DESTDIR)/usr/lib/alternc/
|
BIN=$(DESTDIR)/usr/lib/alternc/
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,6 @@ if [ ! -z "$RELOAD_ZONES" ]; then
|
||||||
$sudo rndc reload "$zone" > /dev/null || echo "Cannot reload bind for zone $zone" >> "$DOMAIN_LOG_FILE"
|
$sudo rndc reload "$zone" > /dev/null || echo "Cannot reload bind for zone $zone" >> "$DOMAIN_LOG_FILE"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if [ -x /usr/sbin/apachectl ]; then
|
|
||||||
$sudo /usr/sbin/apachectl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE"
|
|
||||||
fi
|
|
||||||
if [ -x /usr/sbin/apache2ctl ]; then
|
if [ -x /usr/sbin/apache2ctl ]; then
|
||||||
$sudo /usr/sbin/apache2ctl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE"
|
$sudo /usr/sbin/apache2ctl graceful > /dev/null || echo "Cannot restart apache" >> "$DOMAIN_LOG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Ceci créé un hack php pour chacun des domaines hébergés par alternc
|
|
||||||
# ce hack consiste à restreindre chaque usager à son propre répertoire
|
|
||||||
# dans alternc/html/u/user avec open_base_dir
|
|
||||||
|
|
||||||
# ce script a les dépendances suivantes:
|
|
||||||
# (mysql, /etc/alternc/local.sh) OR /usr/bin/get_account_by_domain dans
|
|
||||||
# l'ancien package alternc-admintools désormais dans alternc natif.
|
|
||||||
# cut, awk, sort
|
|
||||||
|
|
||||||
override_d=/var/alternc/apacheconf
|
|
||||||
override_f=${override_d}/override_php.conf
|
|
||||||
extra_paths="/var/alternc/dns/redir:/usr/share/php/:/var/alternc/tmp:/tmp"
|
|
||||||
|
|
||||||
. /etc/alternc/local.sh
|
|
||||||
. /usr/lib/alternc/functions.sh
|
|
||||||
|
|
||||||
echo -n "adding open_base_dir protection for:"
|
|
||||||
# boucle sur tous les domaines hébergés, ou sur les arguments de la
|
|
||||||
# ligne de commande
|
|
||||||
if [ $# -gt 0 ]; then
|
|
||||||
for i in "$*"
|
|
||||||
do
|
|
||||||
if echo "$i" | grep -q '^\*\.'
|
|
||||||
then
|
|
||||||
echo skipping wildcard "$i" >&2
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if echo "$i" | grep -q /var/alternc/dns > /dev/null; then
|
|
||||||
dom="$i"
|
|
||||||
else
|
|
||||||
initial_domain=`print_domain_letter "$i"`
|
|
||||||
dom="/var/alternc/dns/$initial_domain/$i"
|
|
||||||
fi
|
|
||||||
doms="$doms $dom"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
doms=`find /var/alternc/dns -type l`
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in $doms
|
|
||||||
do
|
|
||||||
# don't "protect" squirrelmail, it legitimatly needs to consult
|
|
||||||
# files out of its own directory
|
|
||||||
if readlink "$i" | grep -q '^/var/alternc/bureau/admin/webmail/*$' || \
|
|
||||||
readlink "$i" | grep -q '^/var/alternc/bureau/*$'
|
|
||||||
then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
domain=`basename "$i"`
|
|
||||||
account=`get_account_by_domain $domain`
|
|
||||||
if [ -z "$account" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
# la première lettre de l'avant-dernière partie du domaine (e.g.
|
|
||||||
# www.alternc.org -> a)
|
|
||||||
initial_domain=`print_domain_letter "$domain"`
|
|
||||||
# la première lettre du username
|
|
||||||
initial_account=`print_user_letter "$account"`
|
|
||||||
path1="/var/alternc/dns/$initial_domain/$domain"
|
|
||||||
path2="/var/alternc/html/$initial_account/$account"
|
|
||||||
|
|
||||||
mkdir -p "$override_d/$initial_domain"
|
|
||||||
if append_no_dupe "$override_d/$initial_domain/$domain" <<EOF
|
|
||||||
<Directory ${path1}>
|
|
||||||
php_admin_value open_basedir ${path2}/:${extra_paths}
|
|
||||||
</Directory>
|
|
||||||
EOF
|
|
||||||
then
|
|
||||||
true
|
|
||||||
else
|
|
||||||
echo -n " $domain"
|
|
||||||
add_dom_entry "Include $override_d/$initial_domain/$domain"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo .
|
|
|
@ -95,7 +95,7 @@ done
|
||||||
for dom in $( mysql_query "select domaine from domaines where dns_action = 'DELETE';") ; do
|
for dom in $( mysql_query "select domaine from domaines where dns_action = 'DELETE';") ; do
|
||||||
dns_delete $dom
|
dns_delete $dom
|
||||||
# Web configurations have already bean cleaned previously
|
# Web configurations have already bean cleaned previously
|
||||||
mysql_query "delete sub_domaines where domaine='$dom'; delete domaines where domaine='$dom';"
|
mysql_query "delete from sub_domaines where domaine='$dom'; delete from domaines where domaine='$dom';"
|
||||||
RELOAD_ZONES="$RELOAD_ZONES $dom"
|
RELOAD_ZONES="$RELOAD_ZONES $dom"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -114,7 +114,8 @@ fi
|
||||||
mv "$tempo" "$VHOST_FILE"
|
mv "$tempo" "$VHOST_FILE"
|
||||||
|
|
||||||
# we assume we run apache and bind on the master
|
# we assume we run apache and bind on the master
|
||||||
/usr/bin/alternc_reload $RELOAD_ZONES || true
|
#/usr/bin/alternc_reload $RELOAD_ZONES || true
|
||||||
|
/usr/bin/alternc_reload all || true
|
||||||
for slave in $ALTERNC_SLAVES; do
|
for slave in $ALTERNC_SLAVES; do
|
||||||
if [ "$slave" != "localhost" ]; then
|
if [ "$slave" != "localhost" ]; then
|
||||||
ssh alternc@$slave alternc_reload "$RELOAD_ZONES" || true
|
ssh alternc@$slave alternc_reload "$RELOAD_ZONES" || true
|
||||||
|
|
Loading…
Reference in New Issue