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