Hi everyone, I'm configuring Zope to work with Apache. A quick question: I compiled Zope 2.0 with # python w_pcgi.py Then I started up Zope by typing #./start -p '' & No problems. My site was available at http://foo.bar:8080/ I followed the directions in the Zope and Apache howto and added some lines to my Apache config file. I made sure the final Rewrite rule pointed to the Zope.cgi file in my Zope directory. After restarting Apache, my non-Zope pages are still available just as they should be. Unfortunately, http://foo.bar/atlas/ (which, of course, refers to a Zope-generated page) returns an error which says: Forbidden You don't have permission to access /atlas/ on this server. Any ideas? If I understand this correctly, the Zope.cgi file should have all of the information necessary to access my Zope pages, e.g., ZServer is running on port 8080. -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
Did you add Options ExecCGI to your zope Zope.cgi directory? -steve
On Tue, 7 Sep 1999, Steve Spicklemire wrote:
Did you add
Options ExecCGI
to
your zope Zope.cgi directory?
Does this "Options ExecCGI" go in an Apache config file? I don't recognize it. -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
Hi Tim, Something like this should work: <Directory /where/you/have/Zope/installed/> Options ExecCGI </Directory> otherwise you may not be able execute the Zope.cgi script! Also.. make sure that the Zope pcgi process can read the script! It seems to default to 'rwx--x--x' which, in my configuration, won't fly. -steve
"Tim" == Tim Wilson <wilson@chemsun.chem.umn.edu> writes:
Tim> On Tue, 7 Sep 1999, Steve Spicklemire wrote: >> Did you add >> >> Options ExecCGI >> >> to >> >> your zope Zope.cgi directory? Tim> Does this "Options ExecCGI" go in an Apache config file? I Tim> don't recognize it. Tim> -Tim Tim> -- Timothy Wilson | "The faster you | Check out: Henry Sibley Tim> H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, Tim> MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu Tim> | -Einstein | http://www.mn-linux.org/
On Tue, 7 Sep 1999, Steve Spicklemire wrote:
Something like this should work:
<Directory /where/you/have/Zope/installed/> Options ExecCGI </Directory>
otherwise you may not be able execute the Zope.cgi script!
Also.. make sure that the Zope pcgi process can read the script! It seems to default to 'rwx--x--x' which, in my configuration, won't fly.
OK, I checked access.conf and found: <Directory /home/httpd/cgi-bin> AllowOverride None Options ExecCGI </Directory> I copied Zope.cgi from my Zope directory to /home/httpd/cgi-bin. Then I did a chmod 755 Zope.cgi, but no joy. Same error message. -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
Hmmm.... is Zope.cgi a link or a real file? If it's a link you may also need FollowSymLinks: e.g., Options ExecCGI FollowSymLinks I have something like this: <VirtualHost <your virtual host ip address>:80> ServerAdmin steve@spvi.com DocumentRoot /webroot/htdocs ServerName test3.your.domain ErrorLog /webroot/logs/error_log CustomLog /webroot/logs/access_log common <Directory /usr/local/etc/Zope2> Options ExecCGI </Directory> #RewriteLog /webroot/logs/rewrite.log #RewriteLogLevel 9 RewriteEngine on RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/(.*) /usr/local/etc/Zope2/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l] </VirtualHost> Also... what version of apache are you using? I thought access.conf was deprecated now.... not sure about that... -steve
"Tim" == Tim Wilson <wilson@chemsun.chem.umn.edu> writes:
Tim> On Tue, 7 Sep 1999, Steve Spicklemire wrote: >> Something like this should work: >> >> <Directory /where/you/have/Zope/installed/> Options ExecCGI >> </Directory> >> >> otherwise you may not be able execute the Zope.cgi script! >> >> Also.. make sure that the Zope pcgi process can read the >> script! It seems to default to 'rwx--x--x' which, in my >> configuration, won't fly. Tim> OK, I checked access.conf and found: <Directory /home/httpd/cgi-bin> AllowOverride None Options ExecCGI </Directory> I copied Zope.cgi from my Zope directory to /home/httpd/cgi-bin. Then I did a chmod 755 Zope.cgi, but no joy. Same error message. -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/ Tim> I copied Zope.cgi from my Zope directory to Tim> /home/httpd/cgi-bin. Then I did a chmod 755 Zope.cgi, but no Tim> joy. Same error message. Tim> -Tim Tim> -- Timothy Wilson | "The faster you | Check out: Henry Sibley Tim> H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, Tim> MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu Tim> | -Einstein | http://www.mn-linux.org/
On Tue, 7 Sep 1999, Steve Spicklemire wrote:
is Zope.cgi a link or a real file? If it's a link you may also need FollowSymLinks:
I copied Zope.cgi to /home/httpd/cgi-bin My Apache config looks like this: # Set up Rewriting for ZServer and Apache to play nice together. RewriteEngine On RewriteLog logs/rewrite_log RewriteLogLevel 0 RewriteRule ^/mailman - [l] RewriteRule ^/pipermail - [l] RewriteRule ^/jacobsworld - [l] RewriteRule ^/cgi-bin - [l] RewriteRule ^/icons - [l] RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/(.*) /home/httpd/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=applic ation/x-httpd-cgi,l] Another Apache config file has: <Directory /home/httpd/cgi-bin> AllowOverride None Options ExecCGI </Directory>
Also... what version of apache are you using? I thought access.conf was deprecated now.... not sure about that...
My RedHat 6.0 still uses access.conf. I don't know about other distros. I'd love to hear other ideas. Thanks for all the help so far. -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
i ran into the "not authorized" problem as well when i tried to view subdirectories. my fix was to remove two slashes in the rewrite rule in httpd.conf:
RewriteRule ^/(.*) /home/httpd/Zope.cgi/$1 ^ ^
so the first part of the rule now looks like: RewriteRule ^(.*) /home/httpd/cgi-bin/Zope.cgi$1 by the way, the way you had it set up in your rewrite rule it was looking in "/" for Zope.cgi, not in "/cgi-bin/" where you mentioned you had copied Zope.cgi. HTH jens Jens Vagelpohl Systems Administrator Washtenaw Development Council
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Tim Wilson Sent: Tuesday, September 07, 1999 19:20 To: steve@spvi.com Cc: zope@zope.org Subject: Re: [Zope] Zope+Apache config
On Tue, 7 Sep 1999, Steve Spicklemire wrote:
is Zope.cgi a link or a real file? If it's a link you may also need FollowSymLinks:
I copied Zope.cgi to /home/httpd/cgi-bin
My Apache config looks like this:
# Set up Rewriting for ZServer and Apache to play nice together.
RewriteEngine On RewriteLog logs/rewrite_log RewriteLogLevel 0
RewriteRule ^/mailman - [l] RewriteRule ^/pipermail - [l] RewriteRule ^/jacobsworld - [l] RewriteRule ^/cgi-bin - [l] RewriteRule ^/icons - [l]
RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/(.*) /home/httpd/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=applic ation/x-httpd-cgi,l]
Another Apache config file has:
<Directory /home/httpd/cgi-bin> AllowOverride None Options ExecCGI </Directory>
Also... what version of apache are you using? I thought access.conf was deprecated now.... not sure about that...
My RedHat 6.0 still uses access.conf. I don't know about other distros.
I'd love to hear other ideas. Thanks for all the help so far.
-Tim
-- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
Tim Wilson wrote:
On Tue, 7 Sep 1999, Steve Spicklemire wrote:
is Zope.cgi a link or a real file? If it's a link you may also need FollowSymLinks:
I copied Zope.cgi to /home/httpd/cgi-bin
My Apache config looks like this:
# Set up Rewriting for ZServer and Apache to play nice together.
RewriteEngine On RewriteLog logs/rewrite_log RewriteLogLevel 0
RewriteRule ^/mailman - [l] RewriteRule ^/pipermail - [l] RewriteRule ^/jacobsworld - [l] RewriteRule ^/cgi-bin - [l] RewriteRule ^/icons - [l]
RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/(.*) /home/httpd/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=applic ation/x-httpd-cgi,l]
Your RewriteRule points to /home/httpd/Zope.cgi, but above you said you put Zope.cgi in /home/httpd/cgi-bin. -Michel
On Tue, 7 Sep 1999, Michel Pelletier wrote:
RewriteCond %{HTTP:Authorization} ^(.*) RewriteRule ^/(.*) /home/httpd/Zope.cgi/$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=applic ation/x-httpd-cgi,l]
Your RewriteRule points to /home/httpd/Zope.cgi, but above you said you put Zope.cgi in /home/httpd/cgi-bin.
Michel, Your "Serving Zope and other content from Apache" How-to was excellent, but you utterly failed to take my careless typing into account. You're going to have to do better in the future. :-) Thanks everyone for the help. Don't worry, I've dope-slapped myself. You don't have to. :-) -Tim -- Timothy Wilson | "The faster you | Check out: Henry Sibley H.S. | go, the shorter | http://slashdot.org/ W. St. Paul, MN, USA | you are." | http://linux.com/ wilson@chem.umn.edu | -Einstein | http://www.mn-linux.org/
participants (5)
-
Jens Vagelpohl -
Michel Pelletier -
Steve Spicklemire -
Steve Spicklemire -
Tim Wilson