Re: ругается на конфиг с nginx http recaptcha module

necro nginx-forum на nginx.us
Пт Мар 11 09:51:24 MSK 2011


Igor Sysoev Wrote:
-------------------------------------------------------
> On Mar 10, 2011, at 21:59 , Alexey V. Karagodov
> wrote:
> 
> > скорей всего где ДО строки
> 170 пропущен знак ";" 
> > проверять надо от строки
> 170 и вверх по конфигу 
> 
> Скорее всего. Только не ';', а
> незакрытая кавычка '"'.
> 
> 
> --
> Игорь Сысоев
> http://sysoev.ru
> 
> > On 10.03.2011, at 9:54, necro wrote:
> > 
> >> Приветствую!
> >> Собрал nginx c модулем
> nginx_http_recaptcha_module,
> >> сконфигурировал в
> соответствии с
> >> руководством на
> >>
> https://github.com/yaoweibin/nginx_http_recaptcha_
> module, при
> >> старте nginx выдает ошибку:
> >> 
> >> # nginx -t
> >> : unexpected "C" in /etc/nginx.conf:170
> >> configuration file /etc/nginx.conf test failed
> >> 
> >> Кусок конфига:
> >>     location = /set_secure_cookie {
> >>           internal;
> >>           secure_cookie_expires 1h;
> >>           secure_cookie_md5
> >>
> private_key$binary_remote_addr$secure_cookie_set_e
> xpires_base64;
> >>           add_header Set-Cookie
> >> "CAPTCHA_SESSION=$secure_cookie_set_md5;
> >> expires=$secure_cookie_set_expires; path=/";
> >>           add_header Set-Cookie
> >>
> "CAPTCHA_EXPIRES=$secure_cookie_set_expires_base64
> ;
> >> expires=$secure_cookie_set_expires; path=/";
> >>           rewrite ^.*$ http://example.com
> redirect;
> >>           return 302;
> >>               }
> >> 
> >> Строка 170:
> >> add_header Set-Cookie
> "CAPTCHA_SESSION=$secure_cookie_set_md5;
> >> expires=$secure_cookie_set_expires; path=/";
> >> 
> >> В чём может быть проблема?
> >> 
> >> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?21,181879,181879#m
> sg-181879
> 
> 
> 
> _______________________________________________
> nginx-ru mailing list
> nginx-ru at nginx.org
> http://nginx.org/mailman/listinfo/nginx-ru


Алексей оказался прав, в вышестоящей
секции location в директиве proxy_pass
"http://www.google.com"; отсутствовали
закрывающие двойные кавычки.

Всем спамибо!

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,182069,182204#msg-182204




Подробная информация о списке рассылки nginx-ru