Skip to navigation
Apache2 and Mongrel Cluster
07.12.13
* Make sure your Apache user has access to files in the azureusonrails/public directory: find azureusonrails/public -type d -print0 | xargs --null chmod o+x find azureusonrails/public -type f -print0 | xargs --null chmod o+r chmod o+r azureusonrails/public/.htaccess chmod o+x azureusonrails * Install Mongrel by following the instructions at http://mongrel.rubyforge.org/docs/started.html. * Install mongrel_cluster: gem install mongrel_cluster * Run the following command from the azureusonrails directory to configure a cluster of three Mongrel servers running on ports 8000 to 8002 from the directory /home/azureus/azureusonrails as the user azureus and group azureus: mongrel_rails cluster::configure -e production -p 8000 -N 3 -c /home/azureus/azureusonrails -a 127.0.0.1 --user azureus --group azureus * Start the Mongrel cluster by running the following command from the azureusonrails directory: mongrel_rails cluster::start * Enable the Apache mod_rewrite, mod_proxy, mod_proxy_balancer, mod_expires, mod_headers and mod_mime modules. * Create a new Apache virtual host using the following configuration (adjust the ServerName?, DocumentRoot? and
as necessary):
ServerName azureus.example.org DocumentRoot /home/azureus/azureusonrails/public
AllowOverride FileInfo Indexes
RewriteEngine On # Redirect all non-static requests to Mongrel RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://azureusonrails%{REQUEST_URI} [P,QSA,L] ProxyPassReverse / balancer://azureusonrails ProxyPreserveHost on
BalancerMember http://localhost:8000 BalancerMember http://localhost:8001 BalancerMember http://localhost:8002
Order deny,allow Allow from all
# Block access to .svn directories
ErrorDocument 403 /404.html Order allow,deny Deny from all Satisfy All
You will probably also want to add options to the virtual host configuration to require authentication or restrict access to specific IP addresses. To stop the Mongrel cluster, run: mongrel_rails cluster::stop http://azureusonrails.rubyforge.org/wiki/wiki.pl?Install/Mongrel_Cluster_With_Apache_2.2
Reply
Anonymous
Apache2 and Mongrel Cluster
* Make sure your Apache user has access to files in the azureusonrails/public directory: find azureusonrails/public -type d -print0 | xargs --null chmod o+x find azureusonrails/public -type f -print0 | xargs --null chmod o+r chmod o+r azureusonrails/public/.htaccess chmod o+x azureusonrails * Install Mongrel by following the instructions at http://mongrel.rubyforge.org/docs/started.html. * Install mongrel_cluster: gem install mongrel_cluster * Run the following command from the azureusonrails directory to configure a cluster of three Mongrel servers running on ports 8000 to 8002 from the directory /home/azureus/azureusonrails as the user azureus and group azureus: mongrel_rails cluster::configure -e production -p 8000 -N 3 -c /home/azureus/azureusonrails -a 127.0.0.1 --user azureus --group azureus * Start the Mongrel cluster by running the following command from the azureusonrails directory: mongrel_rails cluster::start * Enable the Apache mod_rewrite, mod_proxy, mod_proxy_balancer, mod_expires, mod_headers and mod_mime modules. * Create a new Apache virtual host using the following configuration (adjust the ServerName?, DocumentRoot? and
as necessary):
ServerName azureus.example.org DocumentRoot /home/azureus/azureusonrails/public
AllowOverride FileInfo Indexes
RewriteEngine On # Redirect all non-static requests to Mongrel RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://azureusonrails%{REQUEST_URI} [P,QSA,L] ProxyPassReverse / balancer://azureusonrails ProxyPreserveHost on
BalancerMember http://localhost:8000 BalancerMember http://localhost:8001 BalancerMember http://localhost:8002
Order deny,allow Allow from all
# Block access to .svn directories
ErrorDocument 403 /404.html Order allow,deny Deny from all Satisfy All
You will probably also want to add options to the virtual host configuration to require authentication or restrict access to specific IP addresses. To stop the Mongrel cluster, run: mongrel_rails cluster::stop http://azureusonrails.rubyforge.org/wiki/wiki.pl?Install/Mongrel_Cluster_With_Apache_2.2
07.12.13
Reply
Anonymous
Information Epoch 1732375538
Use software leverage to your advantage.
Home
Notebook
Contact us