Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
ef49b7e5
Commit
ef49b7e5
authored
Nov 12, 2008
by
redray
Browse files
changed var-names for ownerrordocs option
added www.-Subdomain option
parent
2fe2c7aa
Changes
6
Hide whitespace changes
Inline
Side-by-side
install/sql/ispconfig3.sql
View file @
ef49b7e5
...
...
@@ -1000,7 +1000,8 @@ CREATE TABLE `web_domain` (
`cgi`
char
(
1
)
NOT
NULL
default
'y'
,
`ssi`
char
(
1
)
NOT
NULL
default
'y'
,
`suexec`
char
(
1
)
NOT
NULL
default
'y'
,
`errordocs`
char
(
1
)
NOT
NULL
default
'y'
,
`is_errordocs`
tinyint
(
1
)
NOT
NULL
default
'1'
,
`is_subdomainwww`
tinyint
(
1
)
NOT
NULL
default
'1'
,
`php`
varchar
(
255
)
NOT
NULL
default
'y'
,
`redirect_type`
varchar
(
255
)
default
NULL
,
`redirect_path`
varchar
(
255
)
default
NULL
,
...
...
interface/web/sites/form/web_domain.tform.php
View file @
ef49b7e5
...
...
@@ -168,11 +168,17 @@ $form["tabs"]['domain'] = array (
'default'
=>
'n'
,
'value'
=>
array
(
0
=>
'n'
,
1
=>
'y'
)
),
'errordocs'
=>
array
(
'datatype'
=>
'
VARCHA
R'
,
'
is_
errordocs'
=>
array
(
'datatype'
=>
'
INTEGE
R'
,
'formtype'
=>
'CHECKBOX'
,
'default'
=>
'y'
,
'value'
=>
array
(
0
=>
'n'
,
1
=>
'y'
)
'default'
=>
'1'
,
'value'
=>
array
(
0
=>
'0'
,
1
=>
'1'
)
),
'is_subdomainwww'
=>
array
(
'datatype'
=>
'INTEGER'
,
'formtype'
=>
'CHECKBOX'
,
'default'
=>
'1'
,
'value'
=>
array
(
0
=>
'0'
,
1
=>
'1'
)
),
'ssl'
=>
array
(
'datatype'
=>
'VARCHAR'
,
...
...
interface/web/sites/lib/lang/en_web_domain.lng
View file @
ef49b7e5
...
...
@@ -26,7 +26,8 @@ $wb["hd_quota_txt"] = 'Harddisk Quota';
$wb
[
"traffic_quota_txt"
]
=
'Traffic Quota'
;
$wb
[
"cgi_txt"
]
=
'CGI'
;
$wb
[
"ssi_txt"
]
=
'SSI'
;
$wb
[
"errordocs_txt"
]
=
'Own Error-Documents'
;
$wb
[
"is_errordocs_txt"
]
=
'Own Error-Documents'
;
$wb
[
"is_subdomainwww_txt"
]
=
'www. Subdomain'
;
$wb
[
"ssl_txt"
]
=
'SSL'
;
$wb
[
"suexec_txt"
]
=
'SuEXEC'
;
$wb
[
"php_txt"
]
=
'PHP'
;
...
...
interface/web/sites/templates/web_domain_edit.htm
View file @
ef49b7e5
...
...
@@ -63,8 +63,12 @@
<span
class=
""
>
{tmpl_var name='suexec'}
</span>
</span>
<span
class=
"wf_oneField"
>
<label
for=
"errordocs"
class=
"wf_preField"
>
{tmpl_var name='errordocs_txt'}
</label>
<span
class=
""
>
{tmpl_var name='errordocs'}
</span>
<label
for=
"is_errordocs"
class=
"wf_preField"
>
{tmpl_var name='is_errordocs_txt'}
</label>
<span
class=
""
>
{tmpl_var name='is_errordocs'}
</span>
</span>
<span
class=
"wf_oneField"
>
<label
for=
"is_subdomainwww"
class=
"wf_preField"
>
{tmpl_var name='is_subdomainwww_txt'}
</label>
<span
class=
""
>
{tmpl_var name='is_subdomainwww'}
</span>
</span>
<span
class=
"wf_oneField"
>
<label
for=
"ssl"
class=
"wf_preField"
>
{tmpl_var name='ssl_txt'}
</label>
...
...
server/conf/vhost.conf.master
View file @
ef49b7e5
...
...
@@ -13,7 +13,7 @@
ServerAdmin webmaster@<tmpl_var name='domain'>
ErrorLog <tmpl_var name='document_root'>/log/error.log
<tmpl_if name='errordocs'
op='==' value='y'
>
<tmpl_if name='
is_
errordocs'>
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
...
...
@@ -87,9 +87,9 @@
<tmpl_if name='php' op='!=' value=''>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
#php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
#php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
#php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
</tmpl_if>
<tmpl_var name='apache_directives'>
</VirtualHost>
...
...
@@ -112,7 +112,7 @@
ErrorLog <tmpl_var name='document_root'>/log/error.log
<tmpl_if name='errordocs'
op='==' value='y'
>
<tmpl_if name='
is_
errordocs'>
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
...
...
@@ -172,9 +172,9 @@
<tmpl_if name='php' op='!=' value=''>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
#php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
#php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
#php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
</tmpl_if>
<tmpl_var name='apache_directives'>
...
...
server/plugins-available/apache2_plugin.inc.php
View file @
ef49b7e5
...
...
@@ -212,10 +212,11 @@ class apache2_plugin {
// Check if the directories are there and create them if nescessary.
if
(
!
is_dir
(
$data
[
"new"
][
"document_root"
]
.
"/web"
))
exec
(
"mkdir -p "
.
$data
[
"new"
][
"document_root"
]
.
"/web"
);
if
(
!
is_dir
(
$data
[
"new"
][
"document_root"
]
.
"/web/error"
))
exec
(
"mkdir -p "
.
$data
[
"new"
][
"document_root"
]
.
"/web/error"
);
if
(
!
is_dir
(
$data
[
"new"
][
"document_root"
]
.
"/web/error"
)
and
$data
[
"new"
][
"is_errordocs"
]
)
exec
(
"mkdir -p "
.
$data
[
"new"
][
"document_root"
]
.
"/web/error"
);
//if(!is_dir($data["new"]["document_root"]."/log")) exec("mkdir -p ".$data["new"]["document_root"]."/log");
if
(
!
is_dir
(
$data
[
"new"
][
"document_root"
]
.
"/ssl"
))
exec
(
"mkdir -p "
.
$data
[
"new"
][
"document_root"
]
.
"/ssl"
);
if
(
!
is_dir
(
$data
[
"new"
][
"document_root"
]
.
"/cgi-bin"
))
exec
(
"mkdir -p "
.
$data
[
"new"
][
"document_root"
]
.
"/cgi-bin"
);
if
(
!
is_dir
(
$data
[
"new"
][
"document_root"
]
.
"/tmp"
))
exec
(
"mkdir -p "
.
$data
[
"new"
][
"document_root"
]
.
"/tmp"
);
// Remove the symlink for the site, if site is renamed
if
(
$this
->
action
==
'update'
&&
$data
[
"old"
][
"domain"
]
!=
''
&&
$data
[
"new"
][
"domain"
]
!=
$data
[
"old"
][
"domain"
])
{
...
...
@@ -287,10 +288,12 @@ class apache2_plugin {
if
(
$this
->
action
==
'insert'
&&
$data
[
"new"
][
"type"
]
==
'vhost'
)
{
// Copy the error pages
$error_page_path
=
escapeshellcmd
(
$data
[
"new"
][
"document_root"
])
.
"/web/error/"
;
exec
(
"cp /usr/local/ispconfig/server/conf/error/"
.
substr
(
escapeshellcmd
(
$conf
[
"language"
]),
0
,
2
)
.
"/* "
.
$error_page_path
);
exec
(
"chmod -R +r "
.
$error_page_path
);
if
(
$data
[
"new"
][
"is_errordocs"
]){
$error_page_path
=
escapeshellcmd
(
$data
[
"new"
][
"document_root"
])
.
"/web/error/"
;
exec
(
"cp /usr/local/ispconfig/server/conf/error/"
.
substr
(
escapeshellcmd
(
$conf
[
"language"
]),
0
,
2
)
.
"/* "
.
$error_page_path
);
exec
(
"chmod -R +r "
.
$error_page_path
);
}
// copy the standard index page
exec
(
"cp /usr/local/ispconfig/server/conf/index/standard_index.html_"
.
substr
(
escapeshellcmd
(
$conf
[
"language"
]),
0
,
2
)
.
" "
.
escapeshellcmd
(
$data
[
"new"
][
"document_root"
])
.
"/web/index.html"
);
exec
(
"chmod +r "
.
escapeshellcmd
(
$data
[
"new"
][
"document_root"
])
.
"/web/index.html"
);
...
...
@@ -369,10 +372,14 @@ class apache2_plugin {
// get alias domains (co-domains and subdomains)
$aliases
=
$app
->
db
->
queryAllRecords
(
"SELECT * FROM web_domain WHERE parent_domain_id = "
.
$data
[
"new"
][
"domain_id"
]
.
" AND active = 'y'"
);
$server_alias
=
''
;
if
(
$data
[
"new"
][
"is_subdomainwww"
]){
$server_alias
.
=
'www.'
.
$data
[
"new"
][
"domain"
]
.
' '
;
}
else
{
$server_alias
=
''
;
}
if
(
is_array
(
$aliases
))
{
foreach
(
$aliases
as
$alias
)
{
$server_alias
.
=
$alias
[
"domain"
]
.
' '
;
$server_alias
.
=
$alias
[
"domain"
]
.
' '
;
$app
->
log
(
"Add server alias:
$alias[domain]
"
,
LOGLEVEL_DEBUG
);
// Rewriting
if
(
$alias
[
"redirect_type"
]
!=
''
)
{
...
...
Write
Preview
Supports
Markdown
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