2014-01-24 3 views
0

nginx를 사용하여 IIS 리버스 프록시 구성을 재현하려고합니다. 이 응용 프로그램은 모바일 아이폰 앱이 우리 LAN에있는 구성 서버와 통신하는 것입니다. 모바일 앱과 웹 서버는 모두 제 3 자이며 문서가 부족합니다.nginx로 IIS 역방향 프록시 구성 재현

문서를 읽고 다른 게시물을 통해보고 후 Web.config의

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
    <rewrite> 
     <rules> 
      <rule name="Authenticate" stopProcessing="true"> 
       <match url="^authenticate(.*)" /> 
       <action type="Rewrite" url="http://INTERNALIP:80{R:1}" logRewrittenUrl="true" /> 
      </rule> 
      <rule name="SAC" stopProcessing="true"> 
       <match url="^sac(.*)" /> 
       <action type="Rewrite" url="http://INTERNALIP:5447{R:1}" logRewrittenUrl="true" /> 
      </rule> 
      <rule name="Config" stopProcessing="true"> 
       <match url="^config(.*)" /> 
       <action type="Rewrite" url="http://INTERNALIP:5449{R:1}" logRewrittenUrl="true" /> 
      </rule> 
     </rules> 
    </rewrite> 
</system.webServer> 
</configuration> 

. 나는 내 서버 지시어에 대해 이것을 생각해 냈다.

nginx.conf

server { 
    listen 5600; 

    server_name mobile.example.com; 
    access_log /var/log/nginx/log/rproxy.log; 
    error_log /var/log/nginx/log/error.log; 

    location ^~ /authenticate(.*){ 
      rewrite ^/authenticate(.*)/ /$1 break; 
      proxy_pass http://INTERNALIP; 
    } 

    location ^~ /sac(.*){ 
      rewrite ^/sac(.*)/ /$1 break; 
      proxy_pass http://INTERNALIP:5447; 
    } 

    location ^~ /config(.*){ 
      rewrite ^/config(.*)/ /$1 break; 
      proxy_pass http://INTERNALIP:5449; 
    } 
} 

내가 로그에서 일부 데이터를보고하고, 그러나 내가 기대하고 있었고, 난 여기에서 어려운 문제 해결을 보내고있어 정말 무엇을이었다. 나는 요청이 어떻게 보 였는지 알기를 원하고 어떤 종류의 요청이 있었으면 좋겠다.하지만 그렇지 않다.

access.log의이

xx.xx.xx.xx - - [24/Jan/2014:18:33:45 +0000] "\x16\x03\x01\x00\xA1\x01\x00\x00\x9D\x03\x01R\xE2\xB2\x09\xBC\x9F\xE4h\x04_\x8C\x0C[\x94\x1E\xE66H\x1DLY^H\x16\xF5U\xF4\xF8" 400 172 "-" "-" 
xx.xx.xx.xx - - [24/Jan/2014:18:33:45 +0000] "\x16\x03\x01\x00\xA1\x01\x00\x00\x9D\x03\x01R\xE2\xB2\x09\xD8>e\x15\x89\xF1\xC1,\xC6_Qj\x96\x88\xC8\x11\x06P=\xB2OE\xB6\xA4,\xE7;/\x00\x00J\x00\xFF\xC0$\xC0#\xC0" 400 172 "-" "-" 
xx.xx.xx.xx - - [24/Jan/2014:18:33:45 +0000] "\x16\x03\x00\x00E\x01\x00\x00A\x03\x00R\xE2\xB2\x09\x09\xEC(\xCE\xD3\xB7$\xA7T\x0C\xEA\xEF^0\xF9In*[email protected]\xFE\x9F\x09\xD3W\xA8)f\x00\x00\x1A\x00\xFF\x00=\x00<\x00/\x00\x05\x00\x04\x005\x00" 400 172 "-" "-" 

어떤 도움을 주시면 감사하겠습니다.

감사

답변

1

내가 검색이 질문을 발견 "\ 16 배속 \ X03 \ X01 \ x00에서"나는 또한 내 access.log의 전반에 걸쳐보고 내가보고 있었는지 그것이 이해되지 않은. 그것을 통해 오는 원시 SSL이야. 나를 위해, 나는 HTTP HTTPS로 리디렉션했지만, 내 서버 정의는 내가 선 듣고에 누락 된 "기본 SSL"에 추가하여 문제를 해결

server { 
    listen 443; 
    server_name my.server.com; 
    ... 
} 

처럼 보였다.

server { 
    listen 443 default ssl; 
    server_name my.server.com; 
    ... 
}