|
1 | 1 |
|
2 | 2 | <VirtualHost <tmpl_var name='ip_address'>:80> |
3 | 3 | <tmpl_if name='php' op='==' value='suphp'> |
4 | | - DocumentRoot <tmpl_var name='web_document_root'> |
| 4 | + DocumentRoot <tmpl_var name='web_document_root'> |
5 | 5 | </tmpl_else> |
6 | | - DocumentRoot <tmpl_var name='web_document_root_www'> |
| 6 | + DocumentRoot <tmpl_var name='web_document_root_www'> |
7 | 7 | </tmpl_if> |
8 | 8 |
|
9 | | - ServerName <tmpl_var name='domain'> |
| 9 | + ServerName <tmpl_var name='domain'> |
10 | 10 | <tmpl_if name='alias'> |
11 | | - ServerAlias <tmpl_var name='alias'> |
| 11 | + ServerAlias <tmpl_var name='alias'> |
12 | 12 | </tmpl_if> |
13 | | - ServerAdmin webmaster@<tmpl_var name='domain'> |
| 13 | + ServerAdmin webmaster@<tmpl_var name='domain'> |
14 | 14 |
|
15 | | - ErrorLog <tmpl_var name='document_root'>/log/error.log |
| 15 | + ErrorLog <tmpl_var name='document_root'>/log/error.log |
16 | 16 | <tmpl_if name='errordocs'> |
17 | 17 |
|
18 | | - ErrorDocument 400 /error/invalidSyntax.html |
19 | | - ErrorDocument 401 /error/authorizationRequired.html |
20 | | - ErrorDocument 403 /error/forbidden.html |
21 | | - ErrorDocument 404 /error/fileNotFound.html |
22 | | - ErrorDocument 405 /error/methodNotAllowed.html |
23 | | - ErrorDocument 500 /error/internalServerError.html |
24 | | - ErrorDocument 503 /error/overloaded.html |
| 18 | + ErrorDocument 400 /error/invalidSyntax.html |
| 19 | + ErrorDocument 401 /error/authorizationRequired.html |
| 20 | + ErrorDocument 403 /error/forbidden.html |
| 21 | + ErrorDocument 404 /error/fileNotFound.html |
| 22 | + ErrorDocument 405 /error/methodNotAllowed.html |
| 23 | + ErrorDocument 500 /error/internalServerError.html |
| 24 | + ErrorDocument 503 /error/overloaded.html |
25 | 25 | </tmpl_if> |
26 | 26 |
|
27 | | - <Directory {tmpl_var name='web_document_root_www'}> |
28 | | - Options FollowSymLinks |
29 | | - AllowOverride Indexes AuthConfig Limit FileInfo |
30 | | - Order allow,deny |
31 | | - Allow from all |
| 27 | + <Directory {tmpl_var name='web_document_root_www'}> |
| 28 | + Options FollowSymLinks |
| 29 | + AllowOverride Indexes AuthConfig Limit FileInfo |
| 30 | + Order allow,deny |
| 31 | + Allow from all |
32 | 32 | <tmpl_if name='ssi' op='==' value='y'> |
33 | | - |
34 | | - # ssi enabled |
35 | | - AddType text/html .shtml |
36 | | - AddOutputFilter INCLUDES .shtml |
37 | | - Options +Includes |
| 33 | + |
| 34 | + # ssi enabled |
| 35 | + AddType text/html .shtml |
| 36 | + AddOutputFilter INCLUDES .shtml |
| 37 | + Options +Includes |
38 | 38 | </tmpl_if> |
39 | | - </Directory> |
| 39 | + </Directory> |
40 | 40 |
|
41 | 41 | <tmpl_if name='cgi' op='==' value='y'> |
42 | | - # cgi enabled |
43 | | - ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/ |
44 | | - AddHandler cgi-script .cgi |
45 | | - AddHandler cgi-script .pl |
| 42 | + # cgi enabled |
| 43 | + ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/ |
| 44 | + AddHandler cgi-script .cgi |
| 45 | + AddHandler cgi-script .pl |
46 | 46 | </tmpl_if> |
47 | 47 | <tmpl_if name='suexec' op='==' value='y'> |
48 | | - # suexec enabled |
49 | | - SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
| 48 | + # suexec enabled |
| 49 | + SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
50 | 50 | </tmpl_if> |
51 | 51 | <tmpl_if name='php' op='==' value='mod'> |
52 | | - # mod_php enabled |
53 | | - AddType application/x-httpd-php .php .php3 .php4 .php5 |
| 52 | + # mod_php enabled |
| 53 | + AddType application/x-httpd-php .php .php3 .php4 .php5 |
54 | 54 | </tmpl_if> |
55 | 55 | <tmpl_if name='php' op='==' value='suphp'> |
56 | | - # suphp enabled |
57 | | - <Directory {tmpl_var name='web_document_root'}> |
58 | | - suPHP_Engine on |
59 | | - # suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
60 | | - AddHandler x-httpd-suphp .php .php3 .php4 .php5 |
61 | | - suPHP_AddHandler x-httpd-suphp |
62 | | - </Directory> |
| 56 | + # suphp enabled |
| 57 | + <Directory {tmpl_var name='web_document_root'}> |
| 58 | + suPHP_Engine on |
| 59 | + # suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
| 60 | + AddHandler x-httpd-suphp .php .php3 .php4 .php5 |
| 61 | + suPHP_AddHandler x-httpd-suphp |
| 62 | + </Directory> |
63 | 63 | </tmpl_if> |
64 | 64 | <tmpl_if name='php' op='==' value='cgi'> |
65 | | - # php as cgi enabled |
66 | | - AddType application/x-httpd-php .php .php3 .php4 .php5 |
| 65 | + # php as cgi enabled |
| 66 | + AddType application/x-httpd-php .php .php3 .php4 .php5 |
67 | 67 | </tmpl_if> |
68 | 68 | <tmpl_if name='php' op='==' value='fast-cgi'> |
69 | | - # php as fast-cgi enabled |
70 | | - <Directory {tmpl_var name='web_document_root_www'}> |
71 | | - AddHandler fcgid-script .php .php3 .php4 .php5 |
72 | | - FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
73 | | - Options +ExecCGI |
74 | | - AllowOverride all |
75 | | - Order allow,deny |
76 | | - Allow from all |
77 | | - </Directory> |
| 69 | + # php as fast-cgi enabled |
| 70 | + <Directory {tmpl_var name='web_document_root_www'}> |
| 71 | + AddHandler fcgid-script .php .php3 .php4 .php5 |
| 72 | + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
| 73 | + Options +ExecCGI |
| 74 | + AllowOverride all |
| 75 | + Order allow,deny |
| 76 | + Allow from all |
| 77 | + </Directory> |
78 | 78 | </tmpl_if> |
79 | 79 | <tmpl_if name="rewrite_enabled"> |
80 | | - |
81 | | - RewriteEngine on |
| 80 | + |
| 81 | + RewriteEngine on |
82 | 82 | <tmpl_loop name="redirects"> |
83 | | - RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC] |
84 | | - RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>] |
| 83 | + RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC] |
| 84 | + RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>] |
85 | 85 | </tmpl_loop> |
86 | 86 | </tmpl_if> |
87 | 87 | <tmpl_if name='php' op='!=' value=''> |
88 | | - |
89 | | - php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" |
90 | | - php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
91 | | - php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
92 | | - #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5 |
| 88 | + |
| 89 | + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" |
| 90 | + php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
| 91 | + php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
| 92 | + #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5 |
93 | 93 | </tmpl_if> |
94 | 94 |
|
95 | | - <tmpl_var name='apache_directives'> |
| 95 | +<tmpl_var name='apache_directives'> |
96 | 96 | </VirtualHost> |
97 | 97 |
|
98 | 98 |
|
|
104 | 104 | ########################################################### |
105 | 105 |
|
106 | 106 | <VirtualHost <tmpl_var name='ip_address'>:443> |
107 | | - DocumentRoot <tmpl_var name='web_document_root'> |
108 | | - ServerName <tmpl_var name='domain'> |
| 107 | +<tmpl_if name='php' op='==' value='suphp'> |
| 108 | + DocumentRoot <tmpl_var name='web_document_root'> |
| 109 | +</tmpl_else> |
| 110 | + DocumentRoot <tmpl_var name='web_document_root_www'> |
| 111 | +</tmpl_if> |
| 112 | + |
| 113 | + ServerName <tmpl_var name='domain'> |
109 | 114 | <tmpl_if name='alias'> |
110 | | - ServerAlias <tmpl_var name='alias'> |
| 115 | + ServerAlias <tmpl_var name='alias'> |
111 | 116 | </tmpl_if> |
112 | | - ServerAdmin webmaster@<tmpl_var name='domain'> |
113 | | - |
114 | | - ErrorLog <tmpl_var name='document_root'>/log/error.log |
| 117 | + ServerAdmin webmaster@<tmpl_var name='domain'> |
| 118 | + |
| 119 | + ErrorLog <tmpl_var name='document_root'>/log/error.log |
115 | 120 |
|
116 | 121 | <tmpl_if name='is_errordocs'> |
117 | | - ErrorDocument 400 /error/invalidSyntax.html |
118 | | - ErrorDocument 401 /error/authorizationRequired.html |
119 | | - ErrorDocument 403 /error/forbidden.html |
120 | | - ErrorDocument 404 /error/fileNotFound.html |
121 | | - ErrorDocument 405 /error/methodNotAllowed.html |
122 | | - ErrorDocument 500 /error/internalServerError.html |
123 | | - ErrorDocument 503 /error/overloaded.html |
124 | | - |
125 | | -</tmpl_if> |
126 | | - SSLEngine on |
127 | | - SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.crt |
128 | | - SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.key |
| 122 | + ErrorDocument 400 /error/invalidSyntax.html |
| 123 | + ErrorDocument 401 /error/authorizationRequired.html |
| 124 | + ErrorDocument 403 /error/forbidden.html |
| 125 | + ErrorDocument 404 /error/fileNotFound.html |
| 126 | + ErrorDocument 405 /error/methodNotAllowed.html |
| 127 | + ErrorDocument 500 /error/internalServerError.html |
| 128 | + ErrorDocument 503 /error/overloaded.html |
| 129 | + |
| 130 | +</tmpl_if> |
| 131 | + SSLEngine on |
| 132 | + SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.crt |
| 133 | + SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.key |
129 | 134 | <tmpl_if name='has_bundle_cert'> |
130 | | - SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.bundle |
| 135 | + SSLCACertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='domain'>.bundle |
131 | 136 | </tmpl_if> |
132 | 137 |
|
133 | 138 | <tmpl_if name='cgi'op='==' value='y'> |
134 | | - # cgi enabled |
135 | | - ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/ |
136 | | - AddHandler cgi-script .cgi |
137 | | - AddHandler cgi-script .pl |
| 139 | + # cgi enabled |
| 140 | + ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/ |
| 141 | + AddHandler cgi-script .cgi |
| 142 | + AddHandler cgi-script .pl |
138 | 143 | </tmpl_if> |
139 | 144 | <tmpl_if name='ssi'op='==' value='y'> |
140 | | - # ssi enabled |
141 | | - AddType text/html .shtml |
142 | | - AddOutputFilter INCLUDES .shtml |
| 145 | + # ssi enabled |
| 146 | + AddType text/html .shtml |
| 147 | + AddOutputFilter INCLUDES .shtml |
143 | 148 | </tmpl_if> |
144 | 149 | <tmpl_if name='suexec'op='==' value='y'> |
145 | | - # suexec enabled |
146 | | - SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
| 150 | + # suexec enabled |
| 151 | + SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
147 | 152 | </tmpl_if> |
148 | 153 | <tmpl_if name='php' op='==' value='mod'> |
149 | | - # mod_php enabled |
150 | | - AddType application/x-httpd-php .php .php3 .php4 .php5 |
| 154 | + # mod_php enabled |
| 155 | + AddType application/x-httpd-php .php .php3 .php4 .php5 |
151 | 156 | </tmpl_if> |
152 | 157 | <tmpl_if name='php' op='==' value='suphp'> |
153 | | - # suphp enabled |
154 | | - suPHP_Engine on |
155 | | - suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
156 | | - AddHandler x-httpd-php .php .php3 .php4 .php5 |
157 | | - suPHP_AddHandler x-httpd-php |
| 158 | + # suphp enabled |
| 159 | + suPHP_Engine on |
| 160 | + suPHP_UserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'> |
| 161 | + AddHandler x-httpd-php .php .php3 .php4 .php5 |
| 162 | + suPHP_AddHandler x-httpd-php |
158 | 163 | </tmpl_if> |
159 | 164 | <tmpl_if name='php' op='==' value='cgi'> |
160 | | - # php as cgi enabled |
161 | | - AddType application/x-httpd-php .php .php3 .php4 .php5 |
| 165 | + # php as cgi enabled |
| 166 | + AddType application/x-httpd-php .php .php3 .php4 .php5 |
162 | 167 | </tmpl_if> |
163 | 168 | <tmpl_if name='php' op='==' value='fast-cgi'> |
164 | | - # php as fast-cgi enabled |
165 | | - <Directory {tmpl_var name='web_document_root_www'}> |
166 | | - AddHandler fcgid-script .php .php3 .php4 .php5 |
167 | | - FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
168 | | - Options +ExecCGI |
169 | | - AllowOverride all |
170 | | - Order allow,deny |
171 | | - Allow from all |
172 | | - </Directory> |
| 169 | + # php as fast-cgi enabled |
| 170 | + <Directory {tmpl_var name='web_document_root_www'}> |
| 171 | + AddHandler fcgid-script .php .php3 .php4 .php5 |
| 172 | + FCGIWrapper <tmpl_var name='fastcgi_starter_path'><tmpl_var name='fastcgi_starter_script'> .php |
| 173 | + Options +ExecCGI |
| 174 | + AllowOverride all |
| 175 | + Order allow,deny |
| 176 | + Allow from all |
| 177 | + </Directory> |
173 | 178 | </tmpl_if> |
174 | 179 | <tmpl_if name="rewrite_enabled"> |
175 | | - |
176 | | - RewriteEngine on |
| 180 | + |
| 181 | + RewriteEngine on |
177 | 182 | <tmpl_loop name="redirects"> |
178 | | - |
179 | | - RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC] |
180 | | - RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>] |
| 183 | + |
| 184 | + RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC] |
| 185 | + RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>] |
181 | 186 | </tmpl_loop> |
182 | 187 | </tmpl_if> |
183 | 188 | <tmpl_if name='php' op='!=' value=''> |
184 | | - |
185 | | - php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" |
186 | | - php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
187 | | - php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
188 | | - #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5 |
| 189 | + |
| 190 | + php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>" |
| 191 | + php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp |
| 192 | + php_admin_value session.save_path <tmpl_var name='document_root'>/tmp |
| 193 | + #php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5 |
189 | 194 | </tmpl_if> |
190 | 195 |
|
191 | | - <tmpl_var name='apache_directives'> |
| 196 | +<tmpl_var name='apache_directives'> |
192 | 197 | </VirtualHost> |
193 | 198 | </IfModule> |
194 | 199 |
|
|
0 commit comments