[OFBiz] Users - Weird multi-instance configuration.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Users - Weird multi-instance configuration.

Rupert Howell
Hi there,

I've got a slightly strange question to do with setting up multiple
instances under Apache. With help from the lists and the docs I
successfully set up multiple instances like:
www.site1.mydomain.com
www.site2.mydomain.com
using mod_jk and virtualhosts.

I've been looking at ways of having multiple instances like
www.mydomain.com/site1
www.mydomain.com/site2

Using reverse proxies (ProxyPass + ProxyPassReverse) directives I've got
it working OK, you can login to the ecommerce app fine. As soon as I log
into the partymgr or any other apps it won't let me log in and returns
me back to the main page. When I try to carry on into the app I'm asked
to login again.

Since I can't debug in this envrionment I'm completely stumped.
Does anyone have any ideas why this is happening or has anyone got any
ideas how this configuration can be successfully achieved.

Cheers loads

Rupert




 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Andrew Sykes
Rupert,

Can you clarify, are you trying to use mod_jk and mod_proxy at the same
time?

Kind Regards
--
Andrew Sykes <[hidden email]>
Sykes Development Ltd

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Rupert Howell
Hi Andrew,

Yes I am - should I not be?
Regards,

Rupert

Andrew Sykes wrote:

>Rupert,
>
>Can you clarify, are you trying to use mod_jk and mod_proxy at the same
>time?
>
>Kind Regards
>  
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Andrew Sykes
Rupert,

In a way mod_jk and mod_proxy do roughly the same thing.

Normally, you would either choose the mod_jk route or the
mod_proxy/mod_rewrite route.

mod_proxy/mod_rewrite is a pretty powerful combination as you can
imagine, also various people have reported difficulties with mod_jk -
although this doesn't mean you couldn't get it working.

Kind Regards.
--
Andrew Sykes <[hidden email]>
Sykes Development Ltd

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Rupert Howell
Thanks Andrew,

I think I'll probably have to research whats what with Apache a bit more
then have another crack at it.
At the moment I'm still very much chucking things here and there and
seeing what happens!!

Regards,
Rupert




Andrew Sykes wrote:

>Rupert,
>
>In a way mod_jk and mod_proxy do roughly the same thing.
>
>Normally, you would either choose the mod_jk route or the
>mod_proxy/mod_rewrite route.
>
>mod_proxy/mod_rewrite is a pretty powerful combination as you can
>imagine, also various people have reported difficulties with mod_jk -
>although this doesn't mean you couldn't get it working.
>
>Kind Regards.
>  
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Andrew Sykes
Rupert,

Just for a little more background - I'll concentrate on
mod_proxy/mod_rewrite as there seems to be plenty info on mod_jk out
there - this will hopefully help you on your way...

mod_proxy turns your apache server into a proxy server, allowing you to
pass requests through to the local/remote application server.
mod_rewrite allows you to transform the URL coming in to address the
appropriate appserver.

E.g. you may want all requests coming in for http://www.mydomain.com to
go to http://localhost:8080/mydomain - mod_rewrite transforms the URL
and mod_proxy passes the request.

So you might end up with httpd.conf entries like this (where x.x.x.x is
mydomain.com's ip)...

-----------------------
<VirtualHost x.x.x.x>
    ServerAlias www.mydomain.com mydomain.com
    RewriteEngine on
    RewriteRule   ^/(.*)$  http://localhost:8080/mydomain/$1  [P,L]
    RewriteRule   ^/myimages(.*)$
http://localhost:8080/an_image_folder/$1  [P,L]
    ProxyPassReverse / http://localhost:5000/mydomain/
</VirtualHost>
-----------------------

Note the entry for myimages, this is where this combination comes into
it's own - here you have mapped requests coming in to myimages through
to a completely different directory (it could be a different server if
you wanted)

Regardless of whether you chose mod_jk or the above this is a real pain
when you're doing it for the first time. I hope this helps you get
everything sorted out!

Kind Regards
--
Andrew Sykes <[hidden email]>
Sykes Development Ltd

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Rupert Howell
Thanks Andrew,

That's plenty to get me started, I'll have a go this weekend and let you
know if I sort it ( - or badger you for help if I don't ;-) )
I think I'll dump mod_jk - this way seems more flexible.

Thanks again,
Rupert


Andrew Sykes wrote:

>Rupert,
>
>Just for a little more background - I'll concentrate on
>mod_proxy/mod_rewrite as there seems to be plenty info on mod_jk out
>there - this will hopefully help you on your way...
>
>mod_proxy turns your apache server into a proxy server, allowing you to
>pass requests through to the local/remote application server.
>mod_rewrite allows you to transform the URL coming in to address the
>appropriate appserver.
>
>E.g. you may want all requests coming in for http://www.mydomain.com to
>go to http://localhost:8080/mydomain - mod_rewrite transforms the URL
>and mod_proxy passes the request.
>
>So you might end up with httpd.conf entries like this (where x.x.x.x is
>mydomain.com's ip)...
>
>-----------------------
><VirtualHost x.x.x.x>
>    ServerAlias www.mydomain.com mydomain.com
>    RewriteEngine on
>    RewriteRule   ^/(.*)$  http://localhost:8080/mydomain/$1  [P,L]
>    RewriteRule   ^/myimages(.*)$
>http://localhost:8080/an_image_folder/$1  [P,L]
>    ProxyPassReverse / http://localhost:5000/mydomain/
></VirtualHost>
>-----------------------
>
>Note the entry for myimages, this is where this combination comes into
>it's own - here you have mapped requests coming in to myimages through
>to a completely different directory (it could be a different server if
>you wanted)
>
>Regardless of whether you chose mod_jk or the above this is a real pain
>when you're doing it for the first time. I hope this helps you get
>everything sorted out!
>
>Kind Regards
>  
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Andrew Sykes
Rupert,

One last point.

You might find this a stumbling block as you seem to be working with a
production server...

The chances are you'll have to recompile apache with
mod_proxy/mod_rewrite. Remember to back up your existing httpd.conf
first!

----------------------
./configure --enable-rewrite --enable-proxy
make
make install
----------------------

Best of Luck!
--
Andrew Sykes <[hidden email]>
Sykes Development Ltd

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Rupert Howell
Hi Andrew,

It looks like everything I need is already there IBM Webserver/Windows
installation - just commented out of the httpd.conf and there's nothing
on the production server yet so I'm free to stop and start as many times
as I like (thankfully).
I've got the http rewrite working OK - I'm a bit (in fact very) puzzled
over the https. I want Apache to take care of the SSL
The problem I've got here is that with AJP I had disabled the http and
https listeners. Now I'm using the mod_proxy and mod_rewrite I've
re-enabled them - is there something I should do within ofbiz  to stop
it using its ssl certificate?
Do you think you could post  how the virtualhost for the secure
connection would look. I'm very confused here as to what SSL directives
I should be using or what should be where. Under mod_jk I had the ssl
stuff working so I'm sure I've got no problem with the certificates etc
and  mod_ssl is definitely enabled and working.
Any help here would be much appreciated - been stuck since I last posted!!

Regards,

Rupert











Andrew Sykes wrote:

>Rupert,
>
>One last point.
>
>You might find this a stumbling block as you seem to be working with a
>production server...
>
>The chances are you'll have to recompile apache with
>mod_proxy/mod_rewrite. Remember to back up your existing httpd.conf
>first!
>
>----------------------
>./configure --enable-rewrite --enable-proxy
>make
>make install
>----------------------
>
>Best of Luck!
>  
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - Weird multi-instance configuration.

Andrew Sykes
Rupert,

Don't despair! you're the second person to ask this in a month! Perhaps
it's time to write an article on this. :-)

The answer is that if you want to use https, you need to install the
certificate with apache, not with the application server. i.e. apache is
the certified contact point with your client.

If you think about it, if it was possible to proxy https like this, man-
in-the-middle attacks would be rife!

I hope this helps...
--
Andrew Sykes <[hidden email]>
Sykes Development Ltd

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users