Welcome! Log In Create A New Profile

Advanced

Reverse proxy subdirectory

July 29, 2010 02:52PM
Здравствуйте!
Сделал как написано тут: http://www.ruby-forum.com/topic/205467

[code]
location /alias1/ {
proxy_pass http://internal-pub.domain.net/;
}
[/code]

вот код:
[code]
server {
listen 192.168.3.25;
server_name superserver;

access_log /var/log/nginx/superserver.access_log main;
error_log /var/log/nginx/superserver.error_log info;

root /var/www/superserver;


location /3dm2/ {
# rewrite /3dm2/(.*) /$1 break;
proxy_pass https://localhost:888/;
proxy_redirect default;
proxy_set_header Host localhost;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}
[/code]

папка /var/www/superserver пустая
вот лог:
[code]
superserver nginx # tail -n 2 superserver.access_log
192.168.3.25 - - [30/Jul/2010:00:32:35 +0600] "GET /3dm2/ HTTP/1.1" 200 1112 "http://192.168.3.25/3dm2/" "ELinks (0.11.7; Linux 2.6.34-gentoo-r1 x86_64; 157x60)" "-"
192.168.3.25 - - [30/Jul/2010:00:32:35 +0600] "GET /blank.html HTTP/1.1" 404 348 "http://192.168.3.25/blank.html" "ELinks (0.11.7; Linux 2.6.34-gentoo-r1 x86_64; 157x60)" "-"
superserver nginx # tail -n 2 superserver.error_log
2010/07/30 00:32:35 [error] 11282#0: *168 open() "/var/www/superserver/blank.html" failed (2: No such file or directory), client: 192.168.3.25, server: superserver, request: "GET /blank.html HTTP/1.1", host: "192.168.3.25", referrer: "http://192.168.3.25/blank.html"
2010/07/30 00:32:37 [info] 11282#0: *168 client 192.168.3.25 closed keepalive connection
[/code]


Если "location /3dm2/" заменяю на "location /" то все работает.
Подскажите, возможно ли в принципе так сделать?


П.С. В указанном конфиге "location /3dm2/" страница /3dm2/ состоит из фреймов, по отдельности фреймы открываются, при открытии самой страницы пишет 404 Not Found
nginx/0.7.65 в каждом фрейме. Открывать пробовал и обычным firefox, то же самое - "location /" работает, "location /3dm2/" - нет.
Subject Author Posted

Reverse proxy subdirectory

andribas July 29, 2010 02:52PM

Re: Reverse proxy subdirectory

Igor Sysoev July 29, 2010 03:08PM

Re: Reverse proxy subdirectory

andribas July 30, 2010 12:35AM

Re: Reverse proxy subdirectory

andribas July 30, 2010 12:48AM

Re: Reverse proxy subdirectory

Igor Sysoev July 30, 2010 02:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready