Hi I have a Debian Server and I managed that Ruby works with Apache2 and the Balancer Manager that listen to the Mongrel server. The Problem is that PHP files don''t work anymore. How do I have to configurate the Balance Manager that PHP is working again like without the Balance Manager? Greetings Andi -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Freddy Andersen
2008-Oct-11 19:45 UTC
Re: Rails + Apache2 + Balancer Manager - PHP doesn''t work
You are going to have a virtualhost that does not forward all request to your mongrel... If the request is sent to a mongrel you will ne be able to render the php file... SO here are some basics: <virtualhost> DirectoryIndex index.php DocumentRoot "/disk/phpcode" alias /railscode/javascripts /disk/railscode/public/javascripts alias /railscode/images /disk/railscode/public/images <Directory "/disk/phpcode"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/disk/railscode/public"> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Location "/railscode"> proxyPass balancer://mongrel/railscode </Location> <virtualhost> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Andi Geheim
2008-Oct-12 09:08 UTC
Re: Rails + Apache2 + Balancer Manager - PHP doesn''t work
Hi Freddy I am operating under ISPConfig, this is my Vhost File: ---------------------------------------------------------------------- NameVirtualHost xx.xx.xx.xx:80 <VirtualHost xx.xx.xx.xx:80> ServerName localhost ServerAdmin root@localhost DocumentRoot /var/www/sharedip <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> </VirtualHost> <Proxy balancer://aekschencluster> # Mitglieder des Clusters BalancerMember http://xx.xx.xx.xx:82 </Proxy> ExtendedStatus On <VirtualHost xx.xx.xx.xx:80> ProxyRequests Off #ProxyPass /balancer-manager ! #ProxyPass /server-status ! ProxyPass / balancer://aekschencluster/ ProxyPassReverse / balancer://aekschencluster/ ServerName www.domain.tdl:80 ServerAdmin webmaster-ps1yJmh03maDrRcMBQpVCA@public.gmane.org DocumentRoot /var/www/web1/web ServerAlias domain.tdl DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm Alias /cgi-bin/ /var/www/web1/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /var/www/web1/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 php_admin_flag safe_mode Off <IfModule mod_ruby.c> <Directory /var/www/web1/web> #Options +ExecCGI Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> RubyRequire apache/ruby-run #RubySafeLevel 0 <Files *.rb> SetHandler ruby-object RubyHandler Apache::RubyRun.instance </Files> <Files *.rbx> SetHandler ruby-object RubyHandler Apache::RubyRun.instance </Files> </IfModule> AddType text/html .shtml AddOutputFilter INCLUDES .shtml Alias /error/ "/var/www/web1/web/error/" ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html AliasMatch ^/~([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> </VirtualHost> ---------------------------------------------------------------------- The ruby projekt is under var/www/web1/ The ruby public is under a symlink var/www/web1/public to var/www/web1/web/ The normal apache is under var/www/web1/web/ Is the error coming from the missing Directory entry? Greetings Andi -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Andi Geheim
2008-Oct-12 17:36 UTC
Re: Rails + Apache2 + Balancer Manager - PHP doesn''t work
aaah okay know I know: ------------------------------------------------------------- <VirtualHost xx.xx.xx.xx:80> <IfModule mod_proxy_balancer.c> <Proxy balancer://aekschencluster> BalancerMember http://xx.xx.xx.xx:82 </Proxy> <Location /de/> ProxyPass balancer://aekschencluster/ stickysession=JSESSIONID #ProxyPassReverse balancer://aekschencluster/de/ </Location> </IfModule> ------------------------------------------------------------- With the location tag you define a URL when the proxy should be active. But my problem is know the link routing from rails because the URL is now http://www.domain.tdl/de/rubyapplication But in my Rails application the links route all to the root http://www.domain.tdl/ What could I do? Greetings Andi -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Andi Geheim
2008-Oct-12 19:20 UTC
Re: Rails + Apache2 + Balancer Manager - PHP doesn''t work
okay I found an other solution. I did it the other way around: ProxyPass /phpBB3 ! ProxyPass / balancer://aekschencluster/ stickysession=JSESSIONID I set the phpBB3 Forum as an exception. greetings -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Freddy Andersen
2008-Oct-13 00:05 UTC
Re: Rails + Apache2 + Balancer Manager - PHP doesn''t work
Depends on the rails backed but if you are using mongrel or thin you can setup a prefix for the app... setup a prefix of /app and then in the balancer you use ProxyPass / balancer://cluster/app --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---