Arc Forumnew | comments | leaders | submitlogin
6 points by lojic 4747 days ago | link | parent

Here's an Apache virtual host config that allows Apache to sit in front of an Arc web server via mod_proxy_balancer. I just took my typical Rails config and tweaked it slightly. You need to have the mod_proxy_balancer module loaded.

I've setup a pseudo IP of and put in my /etc/hosts file with that IP for testing. I'll try 2 Arc processes with sticky sessions later, but for one server the following works fine. If you don't have a bunch of other virtual hosts active, you could probably just use w/o setting up the pseudo IP.

Having Apache sit in front of the Arc server allows using SSL easily, serving up static files directly for extra speed, etc.

    DocumentRoot /home/brian/software/arc/arc2

    <Directory /home/brian/software/arc/arc2 >
      Options FollowSymLinks
      AllowOverride None
      Order allow,deny
      Allow from all

    # Configure cluster
    <Proxy balancer://lojic_cluster>

    RewriteEngine On

    # Prevent access to .svn directories
    RewriteRule ^(.*/)?\.svn/ - [F,L]
    ErrorDocument 403 "Access Forbidden"

    # Redirect all non-static requests to cluster
    RewriteRule ^/(.*)$ balancer://lojic_cluster%{REQUEST_URI} [P,QSA,L]

    # Deflate
    AddOutputFilterByType DEFLATE text/html text/plain text/xml
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    ErrorLog logs/
    CustomLog logs/ combined