Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

apache rules with zope

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


bennetttm at appstate

Sep 4, 2009, 11:58 AM

Post #1 of 4 (941 views)
Permalink
apache rules with zope

I can access two directories in /var/www but not two others.
I have this rule in httpd.conf before the rewrite rules for Zope:

RewriteCond %{REQUEST_URI} !^/(usage|zusage|ead2002|asu_ead)

The usage and zusage directories work, that is /usage goes to the
/var/www/usage directory not looking on Zope/ZODB. Same with the zusage
directory. But ead2002 and asu_ead directories give a Not Found error from
Zope. The Alias and Directory tags in httpd.conf are the same for all four.

The ead2002 and asu_ead directories were added after disabling SE Linux so
those two are not controlled by an access control list and after disabling SE
Linux I would think the others are not controlled by an access control list.
The server was rebooted after disabling SELinux with the relable option
checked.


[root[at]localhost www]# ls -laZ
drwxr-xr-x root root ? asu_ead
drwxr-xr-x root root ? ead2002
drwxr-xr-x. webmaster webmaster system_u:object_r:httpd_sys_content_t:s0 usage
drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0
zusage


There's nothing in the httpd, messages, or secure error logs.

Thanks for any help,

Thomas


--
==========================================
Thomas McMillan Grant Bennett Appalachian State University
Operations & Systems Analyst P O Box 32026
University Library Boone, North Carolina 28608
(828) 262 6587

Library Systems Help Desk: https://www.library.appstate.edu/help/
==========================================
_______________________________________________
Zope maillist - Zope[at]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 )


dev101 at magma

Sep 4, 2009, 12:20 PM

Post #2 of 4 (867 views)
Permalink
Re: apache rules with zope [In reply to]

----- Original Message -----
From: "Thomas Bennett" <bennetttm[at]appstate.edu>
To: <zope[at]zope.org>
Sent: Friday, September 04, 2009 2:58 PM
Subject: [Zope] apache rules with zope


>I can access two directories in /var/www but not two others.
> I have this rule in httpd.conf before the rewrite rules for Zope:
>
> RewriteCond %{REQUEST_URI} !^/(usage|zusage|ead2002|asu_ead)
>
> The usage and zusage directories work, that is /usage goes to the
> /var/www/usage directory not looking on Zope/ZODB. Same with the zusage
> directory. But ead2002 and asu_ead directories give a Not Found error
> from
> Zope. The Alias and Directory tags in httpd.conf are the same for all
> four.
>

You don't usually access underlying file directories directly from zope
unless you are using external methods or an add-on product like "ExtFile".

How are you trying to access these directories?


Jonathan

_______________________________________________
Zope maillist - Zope[at]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 )


dev101 at magma

Sep 4, 2009, 3:14 PM

Post #3 of 4 (854 views)
Permalink
Re: apache rules with zope [In reply to]

----- Original Message -----
From: "Thomas Bennett" <bennetttm[at]appstate.edu>
To: "Jonathan (dev101)" <dev101[at]magma.ca>
Sent: Friday, September 04, 2009 4:09 PM
Subject: Re: [Zope] apache rules with zope


> I'm trying to serve the files on the underlying directories straight
> through
> apache with no zope interaction.
>
> My main site has all content on zope. I now have content also on the
> filesystem I want to server without leaving the site. From
> http://wiki.zope.org/zope2/ZopeAndApache I found I could supposedly use a
> rewrite condition to do such. So usiing the rewrite condition:
>
> RewriteCond %{REQUEST_URI} !^/(usage|zusage|ead2002|asu_ead)
>
> I thought would work. I have found why the usage and zusage directories
> work,
> there is a usage and zusage directory on the zope system so it hasn't been
> using the file system at all for any of them.
>
> Below is the excerpt from wiki.zope.org that explains how to do this,
> which
> doesn't work for me.
>
> "A lot of site content is in Zope, some parts are served directly by
> apache
>
> For this, we use the RewriteRule? where everything is inside Zope, but
> slap a
> RewriteCond? in front of it:
> RewriteCond %{REQUEST_URI} !^/(stats|manual|static_images)
> RewriteRule ^(.*) \
> http://127.0.0.1:8080/VirtualHostBase/\
> http/%{SERVER_NAME}:80/www_example_com/VirtualHostRoot$1 [L,P]


Make sure you are directing zope requests to port 8080 and apache (direct
file access) requests to port 80 (assuming you have zope listening on 8080).


Jonathan



_______________________________________________
Zope maillist - Zope[at]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 )


ric at digitalmarbles

Sep 4, 2009, 4:41 PM

Post #4 of 4 (849 views)
Permalink
Re: apache rules with zope [In reply to]

> ----- Original Message -----
> From: "Thomas Bennett" <bennetttm[at]appstate.edu>
>
>
>> I'm trying to serve the files on the underlying directories straight
>> through
>> apache with no zope interaction.
>>
>> My main site has all content on zope. I now have content also on the
>> filesystem I want to server without leaving the site. From
>> http://wiki.zope.org/zope2/ZopeAndApache I found I could supposedly
>> use a
>> rewrite condition to do such. So usiing the rewrite condition:
>>
>> RewriteCond %{REQUEST_URI} !^/(usage|zusage|ead2002|asu_ead)
>>
>> I thought would work. I have found why the usage and zusage
>> directories
>> work,
>> there is a usage and zusage directory on the zope system so it
>> hasn't been
>> using the file system at all for any of them.
>>
>> Below is the excerpt from wiki.zope.org that explains how to do this,
>> which
>> doesn't work for me.
>>
>> "A lot of site content is in Zope, some parts are served directly by
>> apache
>>
>> For this, we use the RewriteRule? where everything is inside Zope,
>> but
>> slap a
>> RewriteCond? in front of it:
>> RewriteCond %{REQUEST_URI} !^/(stats|manual|static_images)
>> RewriteRule ^(.*) \
>> http://127.0.0.1:8080/VirtualHostBase/\
>> http/%{SERVER_NAME}:80/www_example_com/VirtualHostRoot$1 [L,P]
>



Perhaps RewriteCond doesn't support the alternation syntax in the
conditional pattern. Not sure as I never use RewriteCond. Most cases
are easier written with just RewriteRules alone, like so:

RewriteRule ^/(stats|manual|static_images) - [L]
RewriteRule ^(.*) \
http://127.0.0.1:8080/VirtualHostBase/\
http/%{SERVER_NAME}:80/www_example_com/VirtualHostRoot$1 [P]

Ric





_______________________________________________
Zope maillist - Zope[at]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 users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.