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