Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
alternc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
domainepublic
alternc
Commits
d6511ede
Commit
d6511ede
authored
Mar 06, 2011
by
Alan Garcia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correction de bugs
Correction d'identations
parent
0e608154
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
39 deletions
+35
-39
bureau/admin/adm_deactivate.php
bureau/admin/adm_deactivate.php
+1
-3
etc/alternc/apache2.conf
etc/alternc/apache2.conf
+19
-7
etc/alternc/templates/apache2/panel.conf
etc/alternc/templates/apache2/panel.conf
+7
-22
etc/alternc/templates/apache2/url.conf
etc/alternc/templates/apache2/url.conf
+1
-1
etc/alternc/templates/apache2/vhost.conf
etc/alternc/templates/apache2/vhost.conf
+1
-1
etc/alternc/templates/apache2/webmail.conf
etc/alternc/templates/apache2/webmail.conf
+1
-1
src/functions_hosting.sh
src/functions_hosting.sh
+2
-1
tools/get_account_by_domain
tools/get_account_by_domain
+1
-1
tools/get_domains_by_account
tools/get_domains_by_account
+1
-1
tools/top_http_users
tools/top_http_users
+1
-1
No files found.
bureau/admin/adm_deactivate.php
View file @
d6511ede
...
...
@@ -114,9 +114,7 @@ foreach ($domains as $key => $domain) {
}
else
{
# 2.1 keep a copy of where it was, in an SQL request
$backup
.=
"UPDATE `sub_domaines` SET `type`='
$type
', valeur='
$dest
' WHERE `domaine`='
$domain
' AND sub='
$sub
';
\n
"
;
$backup
.=
"DELETE FROM `sub_domaines_standby` WHERE domaine='
$domain
' and sub='
$sub
';
\n
"
;
$backup
.=
"INSERT INTO sub_domaines_standby (compte,domaine,sub,valeur,type,action) values ('
$cuid
','
$domain
','
$sub
','
$dest
','
$type
',1);
\n
"
;
// UPDATE
$backup
.=
"UPDATE `sub_domaines` SET `type`='
$type
', valeur='
$dest
',web_action='UPDATE' WHERE `domaine`='
$domain
' AND sub='
$sub
';
\n
"
;
# 2.2 change the subdomain to redirect to http://spam.koumbit.org/
$dom
->
lock
();
...
...
etc/alternc/apache2.conf
View file @
d6511ede
...
...
@@ -11,11 +11,23 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
AddHandler
cgi
-
script
.
cgi
</
Directory
>
<
Directory
/
var
/
alternc
>
Order
allow
,
deny
Allow
from
n
one
<
Directory
/>
Options
FollowSymLinks
AllowOverride
N
one
</
Directory
>
<
Directory
/
var
/
alternc
/
bureau
>
Order
allow
,
deny
Allow
from
all
php_admin_flag
safe_mode_gid
off
php_admin_flag
safe_mode
off
php_admin_flag
register_globals
on
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
/
</
Directory
>
<
Directory
/
var
/
alternc
/
html
>
AllowOverride
AuthConfig
FileInfo
Limit
Options
Indexes
Options
Indexes
Includes
FollowSymLinks
MultiViews
...
...
@@ -33,10 +45,10 @@ ScriptAlias /cgi-bin/ /var/alternc/cgi-bin/
</
Directory
>
<
Directory
/
usr
/
share
/
phpmyadmin
>
AllowOverride
AuthConfig
Options
FileInfo
Limit
Indexes
Options
Indexes
Includes
FollowSymLinks
MultiViews
Order
allow
,
deny
Allow
from
all
AllowOverride
AuthConfig
Options
FileInfo
Limit
Indexes
Options
Indexes
Includes
FollowSymLinks
MultiViews
Order
allow
,
deny
Allow
from
all
</
Directory
>
Include
/
etc
/
alternc
/
bureau
.
conf
...
...
etc/alternc/templates/apache2/panel.conf
View file @
d6511ede
<
VirtualHost
*:
80
>
DocumentRoot
/
var
/
alternc
/
bureau
ServerName
%%
fqdn
%%
alias
/
admin
/
sql
/
usr
/
share
/
phpmyadmin
alias
/
webmail
/
usr
/
share
/
squirrelmail
<
Directory
/>
Options
FollowSymLinks
AllowOverride
None
</
Directory
>
<
Directory
/
var
/
alternc
/
bureau
>
Order
allow
,
deny
Allow
from
all
php_admin_flag
safe_mode_gid
off
php_admin_flag
safe_mode
off
php_admin_flag
register_globals
on
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
/
</
Directory
>
LogFormat
"%h %l %u %t \"
%
r
\
" %>s %b \"
%{
Referer
}
i
\
" \"
%{
User
-
Agent
}
i
\
" %T %{Host}i"
alternc
DocumentRoot
/
var
/
alternc
/
bureau
ServerName
%%
fqdn
%%
alias
/
admin
/
sql
/
usr
/
share
/
phpmyadmin
alias
/
webmail
/
usr
/
share
/
squirrelmail
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
>
etc/alternc/templates/apache2/url.conf
View file @
d6511ede
...
...
@@ -6,6 +6,6 @@
RewriteEngine
On
RewriteRule
^/(.*)$ %%
redirect
%%/$
1
[
R
=
301
,
L
]
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
</
Virtualhost
>
etc/alternc/templates/apache2/vhost.conf
View file @
d6511ede
...
...
@@ -6,6 +6,6 @@
php_admin_value
open_basedir
"%%document_root%%:/usr/share/php/:/var/alternc/tmp:/tmp"
</
Directory
>
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
</
VirtualHost
>
etc/alternc/templates/apache2/webmail.conf
View file @
d6511ede
...
...
@@ -9,6 +9,6 @@
Options
Indexes
FollowSymLinks
</
Directory
>
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
</
VirtualHost
>
src/functions_hosting.sh
View file @
d6511ede
...
...
@@ -162,7 +162,8 @@ host_change_enable() {
}
host_delete
()
{
local
FQDN
=
$1
local
VTYPE
=
$1
local
FQDN
=
$2
# Execute post-install hooks
launch_hooks
"delete"
"
$1
"
"
$2
"
"
$3
"
"
$4
"
if
[
$?
-gt
10
]
;
then
...
...
tools/get_account_by_domain
View file @
d6511ede
...
...
@@ -76,7 +76,7 @@ MYSQL_UNREACHABLE_DATABASE=`$printf "$($gettext "Cannot access accounts database
# Have to get AlternC conf file :
!
[
-f
"
$ALTERNC_CONF_FILE
"
]
&&
{
echo
$MISSING_CONF_FILE
;
exit
1
;
}
||
.
$ALTERNC_CONF_FILE
mysql
=
"
$mysql
--defaults-file=/etc/alternc/my.cnf"
$mysql
-e
"
select count(*) from domaines_standby
;"
>
/dev/null 2>&1
$mysql
-e
"
desc domaines
;"
>
/dev/null 2>&1
[
"
$?
"
!=
0
]
&&
{
echo
"
$MYSQL_UNREACHABLE_DATABASE
"
;
exit
1
;
}
# Does the stuff
...
...
tools/get_domains_by_account
View file @
d6511ede
...
...
@@ -75,7 +75,7 @@ MYSQL_UNREACHABLE_DATABASE=`$printf "$($gettext "Cannot access accounts database
!
[
-f
"
$ALTERNC_CONF_FILE
"
]
&&
{
echo
$MISSING_CONF_FILE
;
exit
1
;
}
||
.
$ALTERNC_CONF_FILE
# Must have access to mysql to retreive accounts owning domains :
mysql
=
"
$mysql
--defaults-file=/etc/alternc/my.cnf -B -N -e"
$mysql
"
select count(*) from domaines_standby
;"
>
/dev/null 2>&1
$mysql
"
desc domaines
;"
>
/dev/null 2>&1
[
"
$?
"
!=
0
]
&&
{
echo
"
$MYSQL_UNREACHABLE_DATABASE
"
;
exit
1
;
}
# Does the stuff
...
...
tools/top_http_users
View file @
d6511ede
...
...
@@ -169,7 +169,7 @@ LOG_FILE=$LOG_DIR/access.log
[
-f
"
$ALTERNC_CONF_FILE
"
]
||
{
echo
$MISSING_CONF_FILE
;
exit
1
;
}
&&
.
$ALTERNC_CONF_FILE
# Must have access to mysql to retreive accounts owning domains :
mysql
=
"
$mysql
--defaults-file=/etc/alternc/my.cnf -B -N -e"
$mysql
"
select count(*) from domaines_standby
;"
>
/dev/null 2>&1
$mysql
"
desc domaines
;"
>
/dev/null 2>&1
[
"
$?
"
!=
0
]
&&
{
echo
"
$MYSQL_UNREACHABLE_DATABASE
"
;
exit
1
;
}
# Prevents executing more than one shell at the same time
$lockfilecreate
--retry
1
$LOCK_FILE
...
...
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