Welcome! Log In Create A New Profile

Advanced

rewrite + proxy_pass = 404

February 08, 2010 04:02AM
Всем привет,

стоит задача сделать проксик для запросов к Гуглу через 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.

Что сделано не так ???
Subject Author Posted

rewrite + proxy_pass = 404

softshape February 08, 2010 04:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 158
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