Re: nginx 0.5.33 и Zope (via FastCGI)
Alexander Simonov
a.simonov at favoritbet.com
Fri Nov 30 04:40:45 MSK 2007
26 нояб. 2007, в 18:58, Рогощенков Николай писал(а):
> Добрый вечер,
>
>
> Подскажите пожалуйста, в чем косячу? Хочу заменить Apache2
> на легкий nginx для Zope.
>
>
> В apache2 имею:
>
> > #
> > #NameVirtualHost *:80
> >
> > FastCgiExternalServer /usr/local/apache/htdocs \
> > -socket /tmp/zope.soc \
> > -idle-timeout 600 \
> > -pass-header Authorization
> >
Эм.... Зопа то работает через сокет , а не работает через порт.
> > <VirtualHost 192.168.10.11:80>
> > ServerName MainServer
> > UseCanonicalName off
> > DocumentRoot "/usr/local/apache/htdocs"
> > <Directory "/usr/local/apache/htdocs">
> > Options FollowSymLinks Includes ExecCGI
> > AllowOverride All
> > DirectoryIndex index.fcgi index.html index.htm
> index.shtml
> > Order allow,deny
> > Allow from all
> > </Directory>
> > <Location />
> > SetHandler fastcgi-script
> > </Location>
> > <IfModule mod_fastcgi.c>
> > RewriteEngine on
> > RewriteRule ^/(.*) /usr/local/apache/htdocs/1/$1
> > ErrorLog /var/log/httpd/error_log
> > LogLevel warn
> > LogFormat "%h %l %u %t \"%r\" %>s %b" common
> > CustomLog /var/log/httpd/access_log common
> > </IfModule>
> > </VirtualHost>
>
>
> в nginx сделал:
>
> location / {
> fastcgi_pass unix:/tmp/zope.soc;
> fastcgi_connect_timeout 600;
> fastcgi_pass_header Authorization;
>
> rewrite ^(.*)$ /usr/local/apache/htdocs/1/$1 last;
>
> root /usr/local/apache/htdocs/;
>
> [...]
> }
Так правильно. в реврайте указываеться не абсолютный путь, а
релятивный относительный root'а сервера.
>
> в логах получаю луп:
>
> в error.log:
> 2007/11/26 19:42:15 [error] 24109#0: *2 rewrite or internal
> redirection cycle while processing "/usr/local/apache/htdocs/1//usr/
> loca
> l/apache/htdocs/1//usr/local/apache/htdocs/1//usr/local/apache/
> htdocs/1//usr/local/apache/htdocs/1//usr/local/apache/htdocs/1//usr/l
> ocal/apache/htdocs/1//usr/local/apache/htdocs/1//usr/local/apache/
> htdocs/1//usr/local/apache/htdocs/1//usr/local/apache/htdocs/1//ma
> in/", client: 172.18.33.84, server: nau.iasnet.ru, URL: "/main/",
> host: "test.myhost.ru:8888"
>
> в access.log
> 192.168.30.84 - nvrogosche [26/Nov/2007:19:42:15 +0300] GET /main/
> HTTP/1.1 "500" 383 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Win
> dows NT 5.1; .NET CLR 2.0.50727; InfoPath.1; .NET CLR
> 3.0.04506.30)" "-"
>
>
> --
> C уважением,
> Рогощенков Николай
--
WBR,Alexander Simonov (DEVL-RIPE | DEVL-UANIC)
Programmer, IT Department, Dnepr-Victoria (http://favoritbet.com)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx-ru/attachments/20071130/8de34cbb/attachment.html>
More information about the nginx-ru
mailing list