Description:
update NOTES
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@120 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r55:3e9e12386752 - - 1 file changed: 1 inserted, 1 deleted
@@ -19,49 +19,49 | |||||
|
19 | sudo a2enmod rewrite |
|
19 | sudo a2enmod rewrite |
|
20 | sudo a2enmod proxy |
|
20 | sudo a2enmod proxy |
|
21 | sudo a2enmod proxy_balancer |
|
21 | sudo a2enmod proxy_balancer |
|
22 | sudo a2enmod proxy_http |
|
22 | sudo a2enmod proxy_http |
|
23 | sudo a2enmod deflate |
|
23 | sudo a2enmod deflate |
|
24 | sudo a2enmod headers |
|
24 | sudo a2enmod headers |
|
25 |
|
25 | ||
|
26 | 2.2 edit virtual host at /etc/apache2/site-(available|enabled) |
|
26 | 2.2 edit virtual host at /etc/apache2/site-(available|enabled) |
|
27 |
|
27 | ||
|
28 | added: |
|
28 | added: |
|
29 | =========================================== |
|
29 | =========================================== |
|
30 | <directory "/home/ioi/web_grader/public/"> |
|
30 | <directory "/home/ioi/web_grader/public/"> |
|
31 | Options FollowSymLinks |
|
31 | Options FollowSymLinks |
|
32 | AllowOverride None |
|
32 | AllowOverride None |
|
33 | Order allow,deny |
|
33 | Order allow,deny |
|
34 | Allow from all |
|
34 | Allow from all |
|
35 | </directory> |
|
35 | </directory> |
|
36 |
|
36 | ||
|
37 | <proxy balancer://mongrel_cluster> |
|
37 | <proxy balancer://mongrel_cluster> |
|
38 | BalancerMember http://127.0.0.1:8000 |
|
38 | BalancerMember http://127.0.0.1:8000 |
|
39 | BalancerMember http://127.0.0.1:8001 |
|
39 | BalancerMember http://127.0.0.1:8001 |
|
40 | BalancerMember http://127.0.0.1:8002 |
|
40 | BalancerMember http://127.0.0.1:8002 |
|
41 | BalancerMember http://127.0.0.1:8003 |
|
41 | BalancerMember http://127.0.0.1:8003 |
|
42 | BalancerMember http://127.0.0.1:8004 |
|
42 | BalancerMember http://127.0.0.1:8004 |
|
43 |
- Allow from |
|
43 | + Allow from all |
|
44 | </proxy> |
|
44 | </proxy> |
|
45 |
|
45 | ||
|
46 | # can't use proxypass because we want access to balancer-manager |
|
46 | # can't use proxypass because we want access to balancer-manager |
|
47 | #ProxyPass / balancer://mongrel_cluster/ |
|
47 | #ProxyPass / balancer://mongrel_cluster/ |
|
48 | #ProxyPassReverse / balancer://mongrel_cluster/ |
|
48 | #ProxyPassReverse / balancer://mongrel_cluster/ |
|
49 |
|
49 | ||
|
50 | <Location /balancer-manager> |
|
50 | <Location /balancer-manager> |
|
51 | SetHandler balancer-manager |
|
51 | SetHandler balancer-manager |
|
52 | </Location> |
|
52 | </Location> |
|
53 |
|
53 | ||
|
54 | RewriteEngine On |
|
54 | RewriteEngine On |
|
55 |
|
55 | ||
|
56 | # Uncomment for rewrite debugging |
|
56 | # Uncomment for rewrite debugging |
|
57 | RewriteLog "/var/log/apache2/ioi_rewrite.log" |
|
57 | RewriteLog "/var/log/apache2/ioi_rewrite.log" |
|
58 | RewriteLogLevel 9 |
|
58 | RewriteLogLevel 9 |
|
59 |
|
59 | ||
|
60 | # Rewrite to check for Rails cached page |
|
60 | # Rewrite to check for Rails cached page |
|
61 | RewriteRule ^([^.]+)$ $1.html [QSA] |
|
61 | RewriteRule ^([^.]+)$ $1.html [QSA] |
|
62 |
|
62 | ||
|
63 | # Redirect all non-static requests to cluster |
|
63 | # Redirect all non-static requests to cluster |
|
64 | RewriteCond %{REQUEST_URI} !^/balancer-manager/(.*)$ |
|
64 | RewriteCond %{REQUEST_URI} !^/balancer-manager/(.*)$ |
|
65 | RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f |
|
65 | RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f |
|
66 | RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] |
|
66 | RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] |
|
67 | =========================================== |
|
67 | =========================================== |
You need to be logged in to leave comments.
Login now