commit | author | age
|
47cca9
|
1 |
|
T |
2 |
<Directory {tmpl_var name='web_basedir'}/{tmpl_var name='domain'}> |
|
3 |
AllowOverride None |
|
4 |
Order Deny,Allow |
|
5 |
Deny from all |
|
6 |
</Directory> |
|
7 |
|
a7bdf8
|
8 |
<tmpl_loop name="vhosts"> |
T |
9 |
<VirtualHost {tmpl_var name='ip_address'}:{tmpl_var name='port'}> |
47cca9
|
10 |
<tmpl_if name='php' op='==' value='suphp'> |
T |
11 |
DocumentRoot <tmpl_var name='web_document_root'> |
|
12 |
</tmpl_else> |
|
13 |
<tmpl_if name='php' op='==' value='cgi'> |
|
14 |
DocumentRoot <tmpl_var name='web_document_root'> |
|
15 |
</tmpl_else> |
|
16 |
DocumentRoot <tmpl_var name='web_document_root_www'> |
|
17 |
</tmpl_if> |
|
18 |
</tmpl_if> |
|
19 |
|
|
20 |
ServerName <tmpl_var name='domain'> |
|
21 |
<tmpl_if name='alias'> |
|
22 |
<tmpl_var name='alias'> |
|
23 |
</tmpl_if> |
|
24 |
ServerAdmin webmaster@<tmpl_var name='domain'> |
|
25 |
|
|
26 |
ErrorLog /var/log/ispconfig/httpd/<tmpl_var name='domain'>/error.log |
3e0034
|
27 |
|
47cca9
|
28 |
<tmpl_if name='errordocs'> |
ad1558
|
29 |
Alias /error/ "<tmpl_var name='web_document_root_www'>/error/" |
47cca9
|
30 |
ErrorDocument 400 /error/400.html |
T |
31 |
ErrorDocument 401 /error/401.html |
|
32 |
ErrorDocument 403 /error/403.html |
|
33 |
ErrorDocument 404 /error/404.html |
|
34 |
ErrorDocument 405 /error/405.html |
|
35 |
ErrorDocument 500 /error/500.html |
445513
|
36 |
ErrorDocument 502 /error/502.html |
47cca9
|
37 |
ErrorDocument 503 /error/503.html |
T |
38 |
</tmpl_if> |
a7bdf8
|
39 |
|
T |
40 |
<IfModule mod_ssl.c> |
|
41 |
<tmpl_if name='ssl_enabled'> |
|
42 |
SSLEngine on |
|
43 |
SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt |
|
44 |
SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key |
|
45 |
<tmpl_if name='has_bundle_cert'> |
|
46 |
SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.bundle |
|
47 |
</tmpl_if> |
dfc3c9
|
48 |
</tmpl_if> |
a7bdf8
|
49 |
</IfModule> |
dfc3c9
|
50 |
|
47cca9
|
51 |
<Directory {tmpl_var name='web_document_root_www'}> |
T |
52 |
Options FollowSymLinks |
f2ea1a
|
53 |
AllowOverride <tmpl_var name='allow_override'> |
47cca9
|
54 |
Order allow,deny |
T |
55 |
Allow from all |
|
56 |
<tmpl_if name='ssi' op='==' value='y'> |
|
57 |
|
|
58 |
# ssi enabled |
|
59 |
AddType text/html .shtml |
|
60 |
AddOutputFilter INCLUDES .shtml |
|
61 |
Options +Includes |
|
62 |
</tmpl_if> |
|
63 |
<tmpl_if name='php' op='==' value='no'> |
|
64 |
<Files ~ '.php[s3-6]{0,1}$'> |
|
65 |
Order allow,deny |
|
66 |
Deny from all |
|
67 |
Allow from none |
|
68 |
</Files> |
|
69 |
</tmpl_if> |
|
70 |
</Directory> |
|
71 |
<Directory {tmpl_var name='web_document_root'}> |
|
72 |
Options FollowSymLinks |
f2ea1a
|
73 |
AllowOverride <tmpl_var name='allow_override'> |
47cca9
|
74 |
Order allow,deny |
T |
75 |
Allow from all |
|
76 |
<tmpl_if name='ssi' op='==' value='y'> |
|
77 |
|
|
78 |
# ssi enabled |
|
79 |
AddType text/html .shtml |
|
80 |
AddOutputFilter INCLUDES .shtml |
|
81 |
Options +Includes |
|
82 |
</tmpl_if> |
07d3a1
|
83 |
<tmpl_if name='php' op='==' value='no'> |
T |
84 |
<Files ~ '.php[s3-6]{0,1}$'> |
|
85 |
Order allow,deny |
|
86 |
Deny from all |
|
87 |
Allow from none |
|
88 |
</Files> |
|
89 |
</tmpl_if> |
|
90 |
</Directory> |
|
91 |
|
22ef48
|
92 |
<tmpl_if name='ruby' op='==' value='y'> |
T |
93 |
<IfModule mod_ruby.c> |
b6d93d
|
94 |
<Directory {tmpl_var name='web_document_root_www'}> |
22ef48
|
95 |
Options +ExecCGI |
T |
96 |
</Directory> |
|
97 |
RubyRequire apache/ruby-run |
|
98 |
#RubySafeLevel 0 |
|
99 |
<Files *.rb> |
|
100 |
SetHandler ruby-object |
|
101 |
RubyHandler Apache::RubyRun.instance |
|
102 |
</Files> |
|
103 |
<Files *.rbx> |
|
104 |
SetHandler ruby-object |
|
105 |
RubyHandler Apache::RubyRun.instance |
|
106 |
</Files> |
|
107 |
</IfModule> |
|
108 |
</tmpl_if> |
47cca9
|
109 |
|
298ef5
|
110 |
<tmpl_if name='python' op='==' value='y'> |
F |
111 |
<IfModule mod_python.c> |
f8cd03
|
112 |
<Directory {tmpl_var name='web_document_root_www'}> |
298ef5
|
113 |
AddHandler mod_python .py |
F |
114 |
PythonHandler mod_python.publisher |
|
115 |
PythonDebug On |
|
116 |
</Directory> |
|
117 |
</IfModule> |
|
118 |
</tmpl_if> |
|
119 |
|
47cca9
|
120 |
<tmpl_if name='cgi' op='==' value='y'> |
T |
121 |
# cgi enabled |
|
122 |
<Directory {tmpl_var name='document_root'}/cgi-bin> |
|
123 |
Order allow,deny |
|
124 |
Allow from all |
|
125 |
</Directory> |
|
126 |
ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/ |
|
127 |
AddHandler cgi-script .cgi |
|
128 |
AddHandler cgi-script .pl |
|
129 |
</tmpl_if> |
|
130 |
<tmpl_if name='suexec' op='==' value='y'> |
|
131 |
# suexec enabled |
6f30dd
|
132 |
<IfModule mod_suexec.c> |
F |
133 |
SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
|
134 |
</IfModule> |
47cca9
|
135 |
</tmpl_if> |
94927b
|
136 |
# Clear PHP settings of this website |
T |
137 |
<FilesMatch "\.ph(p3?|tml)$"> |
|
138 |
SetHandler None |
|
139 |
</FilesMatch> |
47cca9
|
140 |
<tmpl_if name='php' op='==' value='mod'> |
T |
141 |
# mod_php enabled |
|
142 |
AddType application/x-httpd-php .php .php3 .php4 .php5 |
215d18
|
143 |
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" |
47cca9
|
144 |
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
T |
145 |
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
10f838
|
146 |
# PHPIniDir <tmpl_var name='custom_php_ini_dir'> |
215d18
|
147 |
<tmpl_if name='security_level' op='==' value='20'> |
c8cf71
|
148 |
php_admin_value open_basedir <tmpl_var name='php_open_basedir'> |
215d18
|
149 |
</tmpl_if> |
47cca9
|
150 |
</tmpl_if> |
T |
151 |
<tmpl_if name='php' op='==' value='suphp'> |
|
152 |
# suphp enabled |
|
153 |
<Directory {tmpl_var name='web_document_root'}> |
f8d8a4
|
154 |
<IfModule mod_suphp.c> |
47cca9
|
155 |
suPHP_Engine on |
T |
156 |
# suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
7fddfe
|
157 |
<tmpl_if name='has_custom_php_ini'> |
T |
158 |
suPHP_ConfigPath <tmpl_var name='custom_php_ini_dir'> |
|
159 |
</tmpl_if> |
47cca9
|
160 |
AddHandler x-httpd-suphp .php .php3 .php4 .php5 |
T |
161 |
suPHP_AddHandler x-httpd-suphp |
f8d8a4
|
162 |
</IfModule> |
47cca9
|
163 |
</Directory> |
T |
164 |
</tmpl_if> |
|
165 |
<tmpl_if name='php' op='==' value='cgi'> |
|
166 |
# php as cgi enabled |
|
167 |
ScriptAlias /php5-cgi <tmpl_var name='cgi_starter_path'><tmpl_var name='cgi_starter_script'> |
|
168 |
Action php5-cgi /php5-cgi |
|
169 |
AddHandler php5-cgi .php .php3 .php4 .php5 |
|
170 |
<Directory {tmpl_var name='cgi_starter_path'}> |
|
171 |
Order allow,deny |
|
172 |
Allow from all |
|
173 |
</Directory> |
|
174 |
</tmpl_if> |
|
175 |
<tmpl_if name='php' op='==' value='fast-cgi'> |
|
176 |
# php as fast-cgi enabled |
8fe84f
|
177 |
# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html |
cdd80b
|
178 |
<IfModule mod_fcgid.c> |
92e0ce
|
179 |
<tmpl_if name='fastcgi_config_syntax' op='==' value='2'> |
af4864
|
180 |
FcgidIdleTimeout 300 |
F |
181 |
FcgidProcessLifeTime 3600 |
64f3d7
|
182 |
# FcgidMaxProcesses 1000 |
af4864
|
183 |
FcgidMinProcessesPerClass 0 |
F |
184 |
FcgidMaxProcessesPerClass 100 |
|
185 |
FcgidConnectTimeout 3 |
|
186 |
FcgidIOTimeout 360 |
|
187 |
FcgidBusyTimeout 300 |
673b07
|
188 |
FcgidMaxRequestLen 1073741824 |
92e0ce
|
189 |
<tmpl_else> |
af4864
|
190 |
IdleTimeout 300 |
F |
191 |
ProcessLifeTime 3600 |
|
192 |
# MaxProcessCount 1000 |
|
193 |
DefaultMinClassProcessCount 0 |
|
194 |
DefaultMaxClassProcessCount 100 |
|
195 |
IPCConnectTimeout 3 |
|
196 |
IPCCommTimeout 360 |
|
197 |
BusyTimeout 300 |
92e0ce
|
198 |
</tmpl_if> |
cdd80b
|
199 |
</IfModule> |
47cca9
|
200 |
<Directory {tmpl_var name='web_document_root_www'}> |
T |
201 |
AddHandler fcgid-script .php .php3 .php4 .php5 |
|
202 |
FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
|
203 |
Options +ExecCGI |
f2ea1a
|
204 |
AllowOverride <tmpl_var name='allow_override'> |
47cca9
|
205 |
Order allow,deny |
T |
206 |
Allow from all |
|
207 |
</Directory> |
af4864
|
208 |
<Directory {tmpl_var name='web_document_root'}> |
2f1ecf
|
209 |
AddHandler fcgid-script .php .php3 .php4 .php5 |
T |
210 |
FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
|
211 |
Options +ExecCGI |
|
212 |
AllowOverride <tmpl_var name='allow_override'> |
|
213 |
Order allow,deny |
|
214 |
Allow from all |
|
215 |
</Directory> |
47cca9
|
216 |
</tmpl_if> |
e64fbb
|
217 |
|
af4864
|
218 |
<tmpl_if name="rewrite_enabled"> |
F |
219 |
RewriteEngine on |
|
220 |
<tmpl_if name='seo_redirect_enabled'> |
e64fbb
|
221 |
RewriteCond %{HTTP_HOST} ^<tmpl_var name='seo_redirect_origin_domain'>$ [NC] |
93539b
|
222 |
RewriteRule ^(.*)$ http://<tmpl_var name='seo_redirect_target_domain'>$1 [R=301,L] |
e64fbb
|
223 |
</tmpl_if> |
47cca9
|
224 |
<tmpl_loop name="redirects"> |
65b81b
|
225 |
RewriteCond %{HTTP_HOST} <tmpl_var name='rewrite_domain'>$ [NC] |
5b92a4
|
226 |
RewriteCond %{REQUEST_URI} !^/webdav/ |
47cca9
|
227 |
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 <tmpl_var name='rewrite_type'> |
T |
228 |
</tmpl_loop> |
|
229 |
</tmpl_if> |
|
230 |
|
c4570e
|
231 |
# add support for apache mpm_itk |
T |
232 |
<IfModule mpm_itk_module> |
|
233 |
AssignUserId <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
|
234 |
</IfModule> |
|
235 |
|
d56eef
|
236 |
<IfModule mod_dav_fs.c> |
f8442b
|
237 |
# Do not execute PHP files in webdav directory |
af4864
|
238 |
<Directory {tmpl_var name='document_root'}/webdav> |
f8442b
|
239 |
<FilesMatch "\.ph(p3?|tml)$"> |
T |
240 |
SetHandler None |
|
241 |
</FilesMatch> |
af4864
|
242 |
</Directory> |
c795ee
|
243 |
DavLockDB {tmpl_var name='document_root'}/tmp/DavLock |
ac933e
|
244 |
# DO NOT REMOVE THE COMMENTS! |
V |
245 |
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE! |
|
246 |
# WEBDAV BEGIN |
|
247 |
# WEBDAV END |
|
248 |
</IfModule> |
|
249 |
|
47cca9
|
250 |
<tmpl_var name='apache_directives'> |
T |
251 |
</VirtualHost> |
a7bdf8
|
252 |
</tmpl_loop> |