Topic: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

Following my previous entry/how-to, this weekend I went the next step and got Apache 2.2 and mongrel_cluster working on my cPanel server (cPanel only just started supporting Apache 2 with their latest EDGE builds).

It took a lot of doing without an explanation of everything needed in one place, so before it seeps back out the other side of my head, I've written it all down for my own reference and hopefully to help others.

Here's the reprint:



I

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

Adam, I have too much time on my hands, so I went ahead and formatted it all into the post for you.  Hope you don't mind. smile

Also, I hope I didn't make any mistakes.  Correct anything I may have messed up, of course.

Josh Catone helps run this place
Rails Forum - Rails Jobs

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

Thanks Josh, all looks good smile

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

I get >

Cannot load /usr/local/apache/modules/mod_proxy.so into server: /usr/local/apache/modules/mod_proxy.so: undefined symbol: proxy_lb_workers

Any idea?

http://danielfischer.com - Personal Web-Technology-Blog, Los Angeles.

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

I got this error trying to get mod_proxy_html to work when following the instructions in the howto.

httpd: Syntax error on line 10 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/mod_proxy_html.so into server: /usr/local/apache/modules/mod_proxy_html.so: undefined symbol: htmlFreeParserCtxt

I solved it by putting this line in the httpd.conf (before the line loading mod_proxy_html)

LoadFile /usr/lib/libxml2.so

Hopefully this is of help to anyone who encounters the same problem.

I should also mention that the newest version of easyapache seems to include mod_proxy so there was no need to load mod_proxy.so, mod_proxy_balancer.so, mod_proxy_http.so from the httpd.conf. When I did try I just got config errors telling me they were already built in.

Last edited by StevenC (2007-09-06 09:45:29)

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

Can anyone advise on using a rails app from a subdirectory in conjuction with an "out of the box" cpanel 11 rails setup.

I've got my rails app running fine, but with cpanel previously have only run them off a main domain.

Several hours of google search have only really turned up posts for people who have access to apache and mongrel config files.  I'm just trying to use the cpanel 11 standard setup.

I've tried using mod_reverse_proxy pointing at http://mydomain.com/subdir but it's not working. Tried a myriad of options so far.

Thanks

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

There's a small formatting error:

# DeflateAddOutputFilterByType DEFLATE text/html text/plain text/css text/xml application/xml application/xhtml+xml text/javascript

Should be:

# Deflate

AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml application/xml application/xhtml+xml text/javascript

(everything after AddOutputFilterByType on one line)

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

Hmmm it's not liking that Rewrite section. I get the following error on my application:

   

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


Goes away when that section is commented out and httpd restarted. Trying to find out why but hopefully noting my experiences is useful to others wink

Re: HOW-TO: cPanel + Apache 2.2 + mod_proxy_balancer + mongrel_cluster

Sorry my bad. Once I had set up the application this error went away. We seem to be running now so thanks Adamp for the tutorial!