ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reverse proxy subdirectory


  • To: nginx-ru@xxxxxxxxx
  • Subject: Reverse proxy subdirectory
  • From: "andribas" <nginx-forum@xxxxxxxx>
  • Date: Thu, 29 Jul 2010 14:52:05 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To:Date; bh=nIabooYZNJlobHIt360mvUAU/9uHVnZdcuEIwIqi27w=; b=KmHLp1ULHheK0hO8GBDQHNkR5Hg7MdsUV4UdfKwLrAxnFT+8MdKP47W3pc1KDBuNFAjdJr9SB3k8vBKWZLpNNWaTQ9/YM47M2v2RVuU7Dl2Ln1WpMxzSFrPUrpycFvWD;

Здравствуйте!
Сделал как написано тут:
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/"  - нет.

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


_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.