Skip to content

Commit 5dee0b1

Browse files
author
redray
committed
1 parent 008ada9 commit 5dee0b1

File tree

6 files changed

+195
-542
lines changed

6 files changed

+195
-542
lines changed

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,7 @@ CREATE TABLE `web_domain` (
10001000
`cgi` char(1) NOT NULL default 'y',
10011001
`ssi` char(1) NOT NULL default 'y',
10021002
`suexec` char(1) NOT NULL default 'y',
1003+
`errordocs` char(1) NOT NULL default 'y',
10031004
`php` varchar(255) NOT NULL default 'y',
10041005
`redirect_type` varchar(255) default NULL,
10051006
`redirect_path` varchar(255) default NULL,

interface/web/sites/form/web_domain.tform.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@
168168
'default' => 'n',
169169
'value' => array(0 => 'n',1 => 'y')
170170
),
171+
'errordocs' => array (
172+
'datatype' => 'VARCHAR',
173+
'formtype' => 'CHECKBOX',
174+
'default' => 'y',
175+
'value' => array(0 => 'n',1 => 'y')
176+
),
171177
'ssl' => array (
172178
'datatype' => 'VARCHAR',
173179
'formtype' => 'CHECKBOX',

interface/web/sites/lib/lang/en_web_domain.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ $wb["hd_quota_txt"] = 'Harddisk Quota';
2626
$wb["traffic_quota_txt"] = 'Traffic Quota';
2727
$wb["cgi_txt"] = 'CGI';
2828
$wb["ssi_txt"] = 'SSI';
29+
$wb["errordocs_txt"] = 'Own Error-Documents';
2930
$wb["ssl_txt"] = 'SSL';
3031
$wb["suexec_txt"] = 'SuEXEC';
3132
$wb["php_txt"] = 'PHP';

interface/web/sites/templates/web_domain_edit.htm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
</select>
9898
</td>
9999
</tr>
100+
<tr>
101+
<td class="frmText11">{tmpl_var name='errordocs_txt'}:</td>
102+
<td class="frmText11">{tmpl_var name='errordocs'}</td>
103+
</tr>
100104
<tr>
101105
<td class="frmText11">{tmpl_var name='active_txt'}:</td>
102106
<td class="frmText11">{tmpl_var name='active'}</td>

server/conf/vhost.conf.master

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
ServerAdmin webmaster@<tmpl_var name='domain'>
1414

1515
ErrorLog <tmpl_var name='document_root'>/log/error.log
16-
1716
<tmpl_if name='errordocs' op='==' value='y'>
17+
1818
ErrorDocument 400 /error/invalidSyntax.html
1919
ErrorDocument 401 /error/authorizationRequired.html
2020
ErrorDocument 403 /error/forbidden.html
2121
ErrorDocument 404 /error/fileNotFound.html
2222
ErrorDocument 405 /error/methodNotAllowed.html
2323
ErrorDocument 500 /error/internalServerError.html
2424
ErrorDocument 503 /error/overloaded.html
25+
</tmpl_if>
2526

26-
</tmpl_if>
2727
<Directory {tmpl_var name='web_document_root_www'}>
2828
Options None
2929
AllowOverride Indexes AuthConfig Limit FileInfo
@@ -78,20 +78,23 @@
7878

7979
RewriteEngine on
8080
<tmpl_loop name="redirects">
81-
8281
RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
8382
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
8483
</tmpl_loop>
8584
</tmpl_if>
85+
<tmpl_if name='php' op='!=' value=''>
8686

87+
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
88+
#php_admin_value open_basedir <tmpl_var name='web_document_root'>:/usr/share/php5
89+
php_admin_value upload_tmp_dir <tmpl_var name='web_document_root'>/tmp
90+
php_admin_value session.save_path <tmpl_var name='web_document_root'>/tmp
91+
</tmpl_if>
8792
<tmpl_var name='apache_directives'>
88-
8993
</VirtualHost>
9094

9195

9296

9397
<tmpl_if name='ssl_enabled'>
94-
9598
<IfModule mod_ssl.c>
9699
###########################################################
97100
# SSL Vhost
@@ -106,7 +109,7 @@
106109
ServerAdmin webmaster@<tmpl_var name='domain'>
107110

108111
ErrorLog <tmpl_var name='document_root'>/log/error.log
109-
112+
110113
<tmpl_if name='errordocs' op='==' value='y'>
111114
ErrorDocument 400 /error/invalidSyntax.html
112115
ErrorDocument 401 /error/authorizationRequired.html
@@ -164,6 +167,13 @@
164167
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
165168
</tmpl_loop>
166169
</tmpl_if>
170+
<tmpl_if name='php' op='!=' value=''>
171+
172+
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
173+
#php_admin_value open_basedir <tmpl_var name='web_document_root'>:/usr/share/php5
174+
php_admin_value upload_tmp_dir <tmpl_var name='web_document_root'>/tmp
175+
php_admin_value session.save_path <tmpl_var name='web_document_root'>/tmp
176+
</tmpl_if>
167177

168178
</VirtualHost>
169179
</IfModule>

0 commit comments

Comments
 (0)