[Zope] Running Zope with apache - login not possible
Takashi Veikko Linzbichler
takashi.linzbichler@smartferret.com
Mon, 26 Mar 2001 16:19:38 +0200
--On Montag, 26. M=E4rz 2001 14:56 +0200 Gitte Wange <gitte@mmmanager.org> =
wrote:
> Well I just accomplished to start Zope on http://<my.ip>:8080/manage
> Now .. is it possible to access zope on http://<my.ip>/manage ??
OK. That's what I got in my httpd.conf. But beware, I've got no virtual =
hosting, although AFAIK there's not much difference, you just put the =
statements into the respective virtual host sections.
--- snip ---
ScriptAlias /zope-cgi-bin/ "/usr/local/httpd/zope-cgi-bin/"
<Directory "/usr/local/httpd/zope-cgi-bin">
AllowOverride None
Options None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
--- snap ---
--- snip ---
RewriteEngine on
# REwriteEngine Off
RewriteLog /var/log/httpd_rewrite
RewriteLogLevel 2
#
# first we check for ~user homes ...
# if not done here, we'd crash into the 'static' rule :-)
RewriteRule ^/~(.*) /~$1 [PT]
UserDir public_html
# we serve 'standard cgi' as usual
RewriteRule ^/cgi-bin/(.*) /usr/local/httpd/cgi-bin/$1 =
[e=3DHTTP_CGI_AUTHORIZATION:%1,t=3Dapplication/x-httpd-cgi,l]
# next is for Zope
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/zope/(.*) /usr/local/httpd/zope-cgi-bin/Zope.cgi/$1 =
[e=3DHTTP_CGI_AUTHORIZATION:%1,t=3Dapplication/x-httpd-cgi,l]
# we serve static content in DocRoot (not as described in HOWTO !!!)
RewriteRule ^(.*) /usr/local/httpd/htdocs/$1 [l]
#
--- snap ---
Actually the RewriteRules might need some explanantion:
1) You don't need the first rule unless serving static (i.e. non-Zope) =
user-sites (something like http://your_server/~your_user
2) You might as well not need the 'standard cgi' rule
3) If you do it that way, all Zope content is served hrough =
http://your_server/zope/rest_of_url, all non-Zope content through =
http://your_server/what_so_ever
But you can easily change this by altering the last two rules, for example, =
have a /static/ directory for non-Zope content as serving your Zope site =
through the base-url (you'll need the 'Zope-rule' as the last one in this =
case, since it
covers any URL that made its way to that rule ...)
hth,
ta
--------------------------------------------------------------------------
smartferret it-consulting Dipl.-Ing. Linzbichler KEG
Dipl.-Ing. Takashi Veikko Linzbichler
Tannhofweg 28/3
A-8044 Graz, Austria
Tel.: 0316 / 39 89 40 -0
Fax: 0316 / 39 89 40 -20
Mobil: 0676 / 31 26 286
eMail: takashi.linzbichler@smartferret.com
WWW: http://www.smartferret.com
--------------------------------------------------------------------------