Debian | Dmytro Shteflyuk's Home https://kpumuk.info In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming. Tue, 08 Sep 2015 00:35:25 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 Upgrading Apache to version 2.2 in Debian https://kpumuk.info/ruby-on-rails/upgrading-apache-to-version-2-2-in-debian/ https://kpumuk.info/ruby-on-rails/upgrading-apache-to-version-2-2-in-debian/#comments Fri, 13 Oct 2006 06:33:37 +0000 http://kpumuk.info/ruby-on-rails/upgrading-apache-to-version-2-2/ Great news, guys! Apache 2.2 is in unstable now. I was very discouraged when tried to do apt-get install apache2-utils and it proposed me to remove apache2 and install it again :-) I decided to install new version to test rails with Apache 2.2, mod_proxy_balancing and mongrel. In this post I’ve described my adventures (or […]

The post Upgrading Apache to version 2.2 in Debian first appeared on Dmytro Shteflyuk's Home.]]>
Great news, guys! Apache 2.2 is in unstable now. I was very discouraged when tried to do apt-get install apache2-utils and it proposed me to remove apache2 and install it again :-) I decided to install new version to test rails with Apache 2.2, mod_proxy_balancing and mongrel. In this post I’ve described my adventures (or misfortunes?)

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.]]>
https://kpumuk.info/ruby-on-rails/upgrading-apache-to-version-2-2-in-debian/feed/ 6