Re: Different load balancers on different ports on same apache http server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thanks a lot for your reply, it works now...

Tue, Nov 24, 2009 at 11:42 AM, Mark Watts <m.watts@xxxxxxxxxxxxxxxx> wrote:

Use a trailing / on the ProxyPass lines.
Also, add a ProxyPassReverse line to match the ProxyPass ones.


Mark.

On Tue, 2009-11-24 at 11:27 +0200, Onur Ağın wrote:
> Hi,
>
>
> I managed to do it with VirtualHost, but it now only works for the
> root document.
> How can I make it work for root document and all other documents
> ( /* )
>
>
> Thanks.
>
>
> <Proxy balancer://mycluster1>
>        BalancerMember http://10.xxx:7101
>        BalancerMember http://10.xxx:7102
> </Proxy>
>
>
> <Proxy balancer://mycluster2>
>        BalancerMember http://10.xxx:7103
>        BalancerMember http://10.xxx:7104
> </Proxy>
>
>
> <VirtualHost 0.0.0.0:8001>
>        ProxyPass / balancer://mycluster1
> </VirtualHost>
>
>
> <VirtualHost 0.0.0.0:8002>
>        ProxyPass / balancer://mycluster2
> </VirtualHost>
>
>
>
>
>
> On Mon, Nov 23, 2009 at 8:39 PM, Onur Ağın <onuragin@xxxxxxxxx> wrote:
>         this should be a simple configuration, yet there are no
>         articles about this....
>         this is how load balancers should work, either different IPs
>         or different ports for load balanced ips, right?
>
>
>
>
>
>         On Mon, Nov 23, 2009 at 4:12 PM, Onur Ağın
>         <onuragin@xxxxxxxxx> wrote:
>                 Thanks for your reply,
>
>
>                 I get an Internal Server error
>                 Internal Server Error
>                 The server encountered an internal error or
>                 misconfiguration and was unable to complete your
>                 request.
>
>                 Please contact the server administrator, admin@xxxx
>                 and inform them of the time the error occurred, and
>                 anything you might have done that may have caused the
>                 error.
>
>                 More information about this error may be available in
>                 the server error log.
>
>
>                 In the error log:
>
>
>                 [Mon Nov 23 16:10:05 2009] [notice] Child 7528: Exit
>                 event signaled. Child process is ending.
>
>                 [Mon Nov 23 16:10:05 2009] [notice] Apache/2.2.14
>                 (Win32) configured -- resuming normal operations
>
>                 [Mon Nov 23 16:10:05 2009] [notice] Server built: Sep
>                 28 2009 22:41:08
>
>                 [Mon Nov 23 16:10:05 2009] [notice] Parent: Created
>                 child process 6468
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468: Child
>                 process is running
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 7528:
>                 Released the start mutex
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Acquired the start mutex.
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Starting 64 worker threads.
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Starting thread to listen on port 8005.
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Starting thread to listen on port 8003.
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Starting thread to listen on port 8001.
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Starting thread to listen on port 8004.
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Starting thread to listen on port 8002.
>
>                 [Mon Nov 23 16:10:06 2009] [notice] Child 6468:
>                 Starting thread to listen on port 80.
>
>                 [Mon Nov 23 16:10:07 2009] [notice] Child 7528: All
>                 worker threads have exited.
>
>                 [Mon Nov 23 16:10:07 2009] [notice] Child 7528: Child
>                 process is exiting
>
>                 [Mon Nov 23 16:10:10 2009] [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.
>
>                 [Mon Nov 23 16:10:11 2009] [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.
>
>                 [Mon Nov 23 16:10:11 2009] [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.
>
>                 [Mon Nov 23 16:10:11 2009] [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.
>
>
>
>
>
>                 Loaded modules are like this in httpd.conf
>                 #
>                 LoadModule actions_module modules/mod_actions.so
>                 LoadModule alias_module modules/mod_alias.so
>                 LoadModule asis_module modules/mod_asis.so
>                 LoadModule auth_basic_module modules/mod_auth_basic.so
>                 #LoadModule auth_digest_module
>                 modules/mod_auth_digest.so
>                 #LoadModule authn_alias_module
>                 modules/mod_authn_alias.so
>                 #LoadModule authn_anon_module
>                 modules/mod_authn_anon.so
>                 #LoadModule authn_dbd_module modules/mod_authn_dbd.so
>                 #LoadModule authn_dbm_module modules/mod_authn_dbm.so
>                 LoadModule authn_default_module
>                 modules/mod_authn_default.so
>                 LoadModule authn_file_module modules/mod_authn_file.so
>                 #LoadModule authnz_ldap_module
>                 modules/mod_authnz_ldap.so
>                 #LoadModule authz_dbm_module modules/mod_authz_dbm.so
>                 LoadModule authz_default_module
>                 modules/mod_authz_default.so
>                 LoadModule authz_groupfile_module
>                 modules/mod_authz_groupfile.so
>                 LoadModule authz_host_module modules/mod_authz_host.so
>                 #LoadModule authz_owner_module
>                 modules/mod_authz_owner.so
>                 LoadModule authz_user_module modules/mod_authz_user.so
>                 LoadModule autoindex_module modules/mod_autoindex.so
>                 #LoadModule cache_module modules/mod_cache.so
>                 #LoadModule cern_meta_module modules/mod_cern_meta.so
>                 LoadModule cgi_module modules/mod_cgi.so
>                 #LoadModule charset_lite_module
>                 modules/mod_charset_lite.so
>                 #LoadModule dav_module modules/mod_dav.so
>                 #LoadModule dav_fs_module modules/mod_dav_fs.so
>                 #LoadModule dav_lock_module modules/mod_dav_lock.so
>                 #LoadModule dbd_module modules/mod_dbd.so
>                 #LoadModule deflate_module modules/mod_deflate.so
>                 LoadModule dir_module modules/mod_dir.so
>                 #LoadModule disk_cache_module
>                 modules/mod_disk_cache.so
>                 #LoadModule dumpio_module modules/mod_dumpio.so
>                 LoadModule env_module modules/mod_env.so
>                 #LoadModule expires_module modules/mod_expires.so
>                 #LoadModule ext_filter_module
>                 modules/mod_ext_filter.so
>                 #LoadModule file_cache_module
>                 modules/mod_file_cache.so
>                 #LoadModule filter_module modules/mod_filter.so
>                 #LoadModule headers_module modules/mod_headers.so
>                 #LoadModule ident_module modules/mod_ident.so
>                 #LoadModule imagemap_module modules/mod_imagemap.so
>                 LoadModule include_module modules/mod_include.so
>                 #LoadModule info_module modules/mod_info.so
>                 LoadModule isapi_module modules/mod_isapi.so
>                 #LoadModule ldap_module modules/mod_ldap.so
>                 #LoadModule logio_module modules/mod_logio.so
>                 LoadModule log_config_module modules/mod_log_config.so
>                 #LoadModule log_forensic_module
>                 modules/mod_log_forensic.so
>                 #LoadModule mem_cache_module modules/mod_mem_cache.so
>                 LoadModule mime_module modules/mod_mime.so
>                 #LoadModule mime_magic_module
>                 modules/mod_mime_magic.so
>                 LoadModule negotiation_module
>                 modules/mod_negotiation.so
>                 LoadModule proxy_module modules/mod_proxy.so
>                 LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
>                 LoadModule proxy_balancer_module
>                 modules/mod_proxy_balancer.so
>                 LoadModule proxy_connect_module
>                 modules/mod_proxy_connect.so
>                 #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
>                 LoadModule proxy_http_module modules/mod_proxy_http.so
>                 #LoadModule rewrite_module modules/mod_rewrite.so
>                 LoadModule setenvif_module modules/mod_setenvif.so
>                 #LoadModule speling_module modules/mod_speling.so
>                 #LoadModule ssl_module modules/mod_ssl.so
>                 #LoadModule status_module modules/mod_status.so
>                 #LoadModule substitute_module
>                 modules/mod_substitute.so
>                 #LoadModule unique_id_module modules/mod_unique_id.so
>                 #LoadModule userdir_module modules/mod_userdir.so
>                 #LoadModule usertrack_module modules/mod_usertrack.so
>                 #LoadModule version_module modules/mod_version.so
>                 LoadModule vhost_alias_module
>                 modules/mod_vhost_alias.so
>
>
>
>
>
>                 On Mon, Nov 23, 2009 at 4:04 PM, Mark Watts
>                 <m.watts@xxxxxxxxxxxxxxxx> wrote:
>
>                         On Mon, 2009-11-23 at 15:57 +0200, Onur Ağın
>                         wrote:
>                         > Hi,
>                         >
>                         >
>                         > I am trying to define several load balancers
>                         each working on different
>                         > ports on same apache http server.
>                         > For example, calling the apache http server
>                         on 8001 should load
>                         > balance on servers a and b, while calls made
>                         to port 8002 should be
>                         > forwarded to c and d.
>                         > How can I achieve this?
>                         >
>                         >
>                         > Thanks...
>                         >
>                         >
>                         >
>                         >
>                         >
>                         >
>                         > <Proxy http://127.0.0.1:8001/ >
>                         > BalancerMember http://10.x.x.x:5101
>                         > BalancerMember http://10.x.x.x:5102
>                         > </Proxy>
>                         >
>                         >
>                         > ProxyPass ????
>                         >
>                         >
>                         > <Proxy http://127.0.0.1:8002/ >
>                         >
>                         >
>                         > BalancerMember http://10.x.x.x:5103
>                         > BalancerMember http://10.x.x.x:5104
>                         > </Proxy>
>                         >
>                         >
>                         >
>                         >
>                         > ProxyPass ???
>
>
>                         I suspect you should be specifying things as
>                         follows:
>
>                         <Proxy balancer://127.0.0.1:8001>
>                                BalancerMember http://10.x.x.x:5101
>                                BalancerMember http://10.x.x.x:5102
>                         </Proxy>
>
>
>                         <Proxy balancer://127.0.0.1:8002>
>                                BalancerMember http://10.x.x.x:5103
>                                BalancerMember http://10.x.x.x:5104
>                         </Proxy>
>
>
>                         <VirtualHost 0.0.0.0:8001>
>                                ProxyPass / balancer://127.0.0.1:8001/
>                         </VirtualHost>
>
>                         <VirtualHost 0.0.0.0:8002>
>                                ProxyPass / balancer://127.0.0.1:8002/
>                         </VirtualHost>
>
>
>
>                         Mark.
>
>
>
>                         --
>                         Mark Watts BSc RHCE MBCS
>                         Senior Systems Engineer, Managed Services
>                         Manpower
>                         www.QinetiQ.com
>                         QinetiQ - Delivering customer-focused
>                         solutions
>                         GPG Key:
>                         http://www.linux-corner.info/mwatts.gpg
>
>
>
>
>
--
Mark Watts BSc RHCE MBCS
Senior Systems Engineer, Managed Services Manpower
www.QinetiQ.com
QinetiQ - Delivering customer-focused solutions
GPG Key: http://www.linux-corner.info/mwatts.gpg


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux