Re: [Zope] zope behind apache reverse proxy css and images broken using eduCommons

2010-06-09 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tapas Mishra wrote:
 Hi,
 I am running a website in a format
 http://ocw.mydomain.com
 where only http://mydomain.com has public IP.
 It is running on Apache.
 
 Now I configured a reverse proxy to be able to reach the server where
 ocw.openitup.in is hosted on Zope
 what is happening is
  request which is coming to a domain ocw.mydomain.com
 
 first reaches the server  mydomain.com (which has a public IP).
 
 
 Then is being forwarded internally to where ocw is present like this
 
URL_A/VirtualHostBase/http/URL_B/VirtualHostRoot/eduCommons
 
 i.e. Apache at mydomain.com contains
 
 ProxyPass   URL_A/VirtualHostBase/http/URL_B/VirtualHostRoot/eduCommons
 ProxyPassReverse   URL_A/VirtualHostBase/http/URL_B/VirtualHostRoot/eduCommons

The best practice[1] is to use mod_rewrite in conjunction with
mod_proxy, e.g.:

 RewriteEngine On
 RewriteRule ^/(.*) \
URLA/VirtualHostBase/http/%{HTTP_HOST}:80/rootfolder/VirtualHostRoot/$1\
[L,P]

where the backslashes indicates that the pattern should be on the same
line.  The rewrite witch can help with getting the rule syntax correct:

  http://betabug.ch/zope/witch



[1] http://wiki.zope.org/zope2/ZopeAndApache


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwPgZkACgkQ+gerLs4ltQ7z2ACdF5tXnQ05peQKoWrRaBASaXFc
2xMAoL3iBdZr+ZD91ZNJbz15D2z0pfs+
=CsFt
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope behind apache reverse proxy css and images broken using eduCommons

2010-06-09 Thread Tapas Mishra
On Wed, Jun 9, 2010 at 5:27 PM, Tres Seaver tsea...@palladion.com wrote:
 The best practice[1] is to use mod_rewrite in conjunction with
 mod_proxy, e.g.:
Thanks for clearing that out.

  RewriteEngine On
  RewriteRule ^/(.*) \
 URLA/VirtualHostBase/http/%{HTTP_HOST}:80/rootfolder/VirtualHostRoot/$1\
 [L,P]
Just one confusion about the syntax here
HTTP_HOST will be replaced by internal IP or hostname where Zope is
serving the pages
so should I use %{ }
 or replaces it by the hostname


  http://betabug.ch/zope/witch
A lot of thanks for this link.

-- 
Tapas
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope behind apache reverse proxy css and images broken using eduCommons

2010-06-09 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tapas Mishra wrote:
 On Wed, Jun 9, 2010 at 5:27 PM, Tres Seaver tsea...@palladion.com wrote:
 The best practice[1] is to use mod_rewrite in conjunction with
 mod_proxy, e.g.:
 Thanks for clearing that out.
 
  RewriteEngine On
  RewriteRule ^/(.*) \
 URLA/VirtualHostBase/http/%{HTTP_HOST}:80/rootfolder/VirtualHostRoot/$1\
 [L,P]
 Just one confusion about the syntax here
 HTTP_HOST will be replaced by internal IP or hostname where Zope is
 serving the pages
 so should I use %{ }
  or replaces it by the hostname

It will be the hostname that the browser requiested (the Host: header).

  http://betabug.ch/zope/witch
 A lot of thanks for this link.

You're welcome!


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwPqTMACgkQ+gerLs4ltQ6wgACePdqWEAjW2MwrI+w9QGqd2WbT
ykYAn3yRgeRZe0jstlkiuuj6rzTOLgJG
=rJ1U
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] zope behind apache reverse proxy css and images broken using eduCommons

2010-06-09 Thread Tapas Mishra
On Wed, Jun 9, 2010 at 8:16 PM, Tres Seaver tsea...@palladion.com wrote:

 It will be the hostname that the browser requiested (the Host: header).
Thanks a lot for telling this.If possible give me a link about this
statement.My site is actually working.
What I finally did was
URLA/VirtualHostBase/http/%{HTTP_HOST}:80/rootfolder/VirtualHostRoot/$1\
 [L,P]
replaced URLA with the hostname of server which the site is requesting
and HTTP_HOST by the URL which browser requests.
-- 
Tapas
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] zope behind apache reverse proxy css and images broken using eduCommons

2010-06-08 Thread Tapas Mishra
Hi,
I am running a website in a format
http://ocw.mydomain.com
where only http://mydomain.com has public IP.
It is running on Apache.

Now I configured a reverse proxy to be able to reach the server where
ocw.openitup.in is hosted on Zope
what is happening is
 request which is coming to a domain ocw.mydomain.com

first reaches the server  mydomain.com (which has a public IP).


Then is being forwarded internally to where ocw is present like this

   URL_A/VirtualHostBase/http/URL_B/VirtualHostRoot/eduCommons

i.e. Apache at mydomain.com contains

ProxyPass   URL_A/VirtualHostBase/http/URL_B/VirtualHostRoot/eduCommons
ProxyPassReverse   URL_A/VirtualHostBase/http/URL_B/VirtualHostRoot/eduCommons


where URL_A is internal IP of machine where the site is hosted for a
request to be able to reach Zope

Zope documentation page says it should have VirtualHostBase and
VirtualHostRoot as its path elements.
Which in above format I have done.

But if some one opens the domain

http://ocw.mydomain.com

then the CSS which is getting loaded in browser when I click view source

it shows

a href=URL_B/eduCommons/path/to/CSS

URL_B is internal IP of server where eduCommons is running.

Note that in a users browser on internet it does not show URL_A that means that
request coming from internet has been able to reach
what ever URL_A means in above directives.

I have checked it by replacing with hostname of server on which it is running.
The CSS does not loads.

If I use hostname instead of URL_B then

http://ocw.mydomain.com

tries to load CSS, Javascrips and images from

href=http://Hostname_B/eduCommons/path/to/CSS;

now Hostname_B is also known only to then computers which are in my LAN.

Any request  on internet does know any thing about it.

I checked replacing Hostname_B with

 ocw.mydomain.com even then
the broken element in page source shows it is trying to fetch the
CSS,Javascript or images from

href=ocw.mydomain.com/eduCommons

the above URL is in page source when client browser tries to load
CSS,Javascript or image on internet.


So what is happening is in the reverse proxy server

which is the first place where the request are coming
it is forwarded internally as

URL_A/VirtualHostBase/http/URL_B/VirtualHostRoot/eduCommons

what ever is present in place of URL_B that the client browser on
internet is trying to load which obviously is not present.



I have also checked by replacing URL_B with URL_A
i.e.


ProxyPass   URL_A/VirtualHostBase/http/URL_A/VirtualHostRoot/eduCommons
ProxyPassReverse   URL_A/VirtualHostBase/http/URL_A/VirtualHostRoot/eduCommons

then on a client browser on internet the CSS is being loaded from

URL_A/eduCommons/path/to/CSS
where URL A is again only known to my LAN and in above ProxyPass
Directive it is taken from second occurrence of URL_A

This URL_A string which some one is getting in a client browser on
internet is again internal IP of my machine where I hosted EduCommons.


-- 
Tapas
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope with Apache

2000-10-06 Thread James Howe

I asked this question a couple of months ago but received no response, so I 
figured I would ask it again to see if anyone can answer the question...

We are running Zope behind an Apache server. We've got things configured so 
that it mostly works. However, we noticed that the "breadcrumbs" list at 
the top of a workspace screen doesn't work correctly. For example, if I'm 
looking at the object /Foo/Bar/Baz, the list of items in the breadcrumbs 
might look like this:

DTMLDocument at / Foo / Bar / Baz

The links to Foo and Bar do not correctly take into account the extra item 
needed to tell Apache that the link goes to the Zope site. For example, the 
link to Foo needs to say something like

http://foo.bar.com/Zope/Foo/manage_workspace

instead of

http://foo.bar.com/Foo/manage_workspace

The tabs for the management screens work fine, however.

In looking at what is happening, I believe the problem exists because the 
links in the breadcrumbs line are relative links.  The link to "foo" would 
look like this:

a href="/foo/manage_workspace"Foo/a

instead of

a href="http://foo.bar.com/Zope/Foo/manage_workspace

When I open the page, the URL I give my browser is "foo.bar.com", but my 
Proxy settings in Apache redirect the request to 
"foo.bar.com:8080/Zope".  When my browser sees the relative path, it 
prepends the "foo.bar.com" instead of "foo.bar.com:8080/Zope" because it 
doesn't know any better.  I've managed to get around the problem by 
changing some code in the tabs_path_info method found in 
Management.py.  Basically I modifed the code to prepend "BASE0" to each of 
the items in the breadcrumbs list.  This way, I get absolute links instead 
of relative.  However, I'm wondering if there is just some additional 
configuration I need to do in Apache to fix this problem without modifying 
Zope itself.  Has anyone else encountered this and is this a bug in Zope, 
or is this simply a configuration issue that I need to resolve. If its a 
configuration issue, what would I need to change.   Any help would be 
appreciated.


Thanks.

James W. Howe   mailto:[EMAIL PROTECTED]
Allen Creek Software, Inc.  pgpkey: http://ic.net/~jwh/pgpkey.html
Ann Arbor, MI 48103


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Zope with Apache

2000-10-06 Thread Steve Spicklemire


Hi James,

   Are you using SiteAccess? If not.. it would probably be worth a try.
It will take care of setting BASE0 etc to soemthing intelligent. 

-steve

 "James" == James Howe [EMAIL PROTECTED] writes:

James I asked this question a couple of months ago but received
James no response, so I figured I would ask it again to see if
James anyone can answer the question...

James We are running Zope behind an Apache server. We've got
James things configured so that it mostly works. However, we
James noticed that the "breadcrumbs" list at the top of a
James workspace screen doesn't work correctly. For example, if
James I'm looking at the object /Foo/Bar/Baz, the list of items
James in the breadcrumbs might look like this:

James DTMLDocument at / Foo / Bar / Baz

James The links to Foo and Bar do not correctly take into account
James the extra item needed to tell Apache that the link goes to
James the Zope site. For example, the link to Foo needs to say
James something like

James http://foo.bar.com/Zope/Foo/manage_workspace

James instead of

James http://foo.bar.com/Foo/manage_workspace

James The tabs for the management screens work fine, however.

James In looking at what is happening, I believe the problem
James exists because the links in the breadcrumbs line are
James relative links.  The link to "foo" would look like this:

James a href="/foo/manage_workspace"Foo/a

James instead of

James a href="http://foo.bar.com/Zope/Foo/manage_workspace

James When I open the page, the URL I give my browser is
James "foo.bar.com", but my Proxy settings in Apache redirect the
James request to "foo.bar.com:8080/Zope".  When my browser sees
James the relative path, it prepends the "foo.bar.com" instead of
James "foo.bar.com:8080/Zope" because it doesn't know any better.
James I've managed to get around the problem by changing some
James code in the tabs_path_info method found in Management.py.
James Basically I modifed the code to prepend "BASE0" to each of
James the items in the breadcrumbs list.  This way, I get
James absolute links instead of relative.  However, I'm wondering
James if there is just some additional configuration I need to do
James in Apache to fix this problem without modifying Zope
James itself.  Has anyone else encountered this and is this a bug
James in Zope, or is this simply a configuration issue that I
James need to resolve. If its a configuration issue, what would I
James need to change.  Any help would be appreciated.


James Thanks.

James James W. Howe mailto:[EMAIL PROTECTED] Allen Creek
James Software, Inc.  pgpkey: http://ic.net/~jwh/pgpkey.html Ann
James Arbor, MI 48103


James ___ Zope
James maillist - [EMAIL PROTECTED]
James http://lists.zope.org/mailman/listinfo/zope ** No cross
James posts or HTML encoding!  ** (Related lists -
James http://lists.zope.org/mailman/listinfo/zope-announce
James http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Zope with Apache

2000-10-06 Thread Evan Simpson

From: James Howe [EMAIL PROTECTED]
 We are running Zope behind an Apache server. We've got things configured so
 that it mostly works. However, we noticed that the "breadcrumbs" list at
 the top of a workspace screen doesn't work correctly.

This was broken with respect to virtual hosting, as well, and the fix for that in the 
CVS trunk may
also take care of what you're seeing.  Should be in Zope 2.3 (soon, I hope).

Cheers,

Evan @ digicool  4-am


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Zope with Apache

2000-07-21 Thread James W. Howe

We are running Zope behind an Apache server.  We've got things configured 
so that it mostly works.  However, we noticed that the "breadcrumbs" list 
at the top of a workspace screen doesn't work correctly.  For example, if 
I'm looking at the object /Foo/Bar/Baz, the list of items in the 
breadcrumbs might look like this:

DTMLDocument at /Foo / Bar / Baz

The links to Foo and Bar do not correctly take into account the extra item 
needed to tell Apache that the link goes to the Zope site.  For example, 
the link to Foo needs to say something like

http://foo.bar.com/Zope/Foo/manage_workspace

instead of

http://foo.bar.com/Foo/manage_workspace

The tabs for the management screens work fine, however.

Has anyone else encountered this and is this a bug in Zope, or simply a 
configuration issue that I need to resolve.  If its a configuration issue, 
what would I need to change.

Thanks.

James W. Howe   mailto:[EMAIL PROTECTED]
Allen Creek Software, Inc.  pgpkey: http://ic.net/~jwh/pgpkey.html 
 
Ann Arbor, MI  48103


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )