First, I need to describe my current Apache 2.0 configuration: I have SVN module enabled with auth_digest module and rails with fcgid. Fist thing I’ve seen was error during upgrade:
1 | Starting web server (apache2)...Syntax error on line 32 of /etc/apache2/mods-enabled/dav_svn.conf: Invalid command "AuthUserFile", perhaps misspelled or defined by a module not included in the server configuration failed! invoke-rc.d: initscript apache2, action "start" failed. |
Weird! In Apache 2.2 configuration format has been changed therefor we need to update scripts:
1 2 3 4 5 6 | AuthType Digest AuthName SVN AuthDigestDomain "/" AuthDigestProvider file AuthUserFile /var/www/svn/passwd AuthzSVNAccessFile /var/www/svn/authz |
Started! But what about rails? It does not working at all. Instead of my application I see contents of dispatch.fcgi! Looks like no fastcgi module installed therefor I’ve tried to install libapache2-mod-fcgid or libapache2-mod-fastcgi. Both of them are depending on Apache 2.0! Looks like I have no other ways to run application except running it under Mongrel. Here is my configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 | <Proxy balancer://appsite> BalancerMember http://localhost:3000 BalancerMember http://localhost:3001 </Proxy> <VirtualHost *:80> ServerName appsite.myhost.com ServerAdmin [email protected] Options Indexes FollowSymlinks RewriteEngine On ProxyPass / balancer://appsite/ ProxyPassReverse / balancer://appsite/ </VirtualHost> |
Please note, if you have your url in ProxyPath ended with trailing slash, you need balancer to be ended with trailing slash too. Moreover, in this case you don’t need slash at the end of BalancerMember directive, otherwise you will get routing error in Rails. If you got error “[warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.“, be sure you’ve enabled modules proxy, proxy_balancer, and proxy_http.
The post Upgrading Apache to version 2.2 in Debian first appeared on Dmytro Shteflyuk's Home.]]>