Welcome! Log In Create A New Profile

Advanced

Re: rewrite + proxy pass = 404

Alexander Kochetov
February 08, 2010 06:44AM
- rewrite ^/r/google(.*)$ $1;
+ rewrite ^/r/google(.*)$ $1 last;

--
Alexander Kochetov



8 февраля 2010 г. 14:34 пользователь softshape <nginx-forum@nginx.us> написал:
> Всем привет,
>
> стоит задача сделать проксик для запросов к Гуглу через Javascript/AJAX. Иначе говоря, запросы вида
>
> http://www.server.ru/r/google/search?hl=en&q=word
>
> - nginx должен проксировать в
>
> http://www.google.com/search?hl=en&q=word
>
> Для этого в конфиге пишем -
>
>                location /r/google {
>                        rewrite ^/r/google(.*)$ $1;
>                        proxy_pass http://www.google.com;
>                }
>
> Но вместо гуглового контента на http://www.server.ru/r/google/search?hl=en&q=word мы получаем 404 Not Found
> nginx/0.8.17.
>
> Что сделано не так ???
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,52045,52045#msg-52045
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://nginx.org/mailman/listinfo/nginx-ru
>
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Re: rewrite + proxy pass = 404

Alexander Kochetov February 08, 2010 06:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 270
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready