사용자 도구

사이트 도구


nginx:proxy

문서의 이전 판입니다!


nginx proxy

Tomcat 연동

로컬의 /example 컨텍스트를 www.example.com으로 연동하고자 할 때 다음과 같이 선언한다.

server {
    server_name www.example.com;

    location / {
        proxy_pass http://localhost:8000/example/;
        proxy_redirect http://www.example.com/example/ http://www.example.com/;
        proxy_cookie_path /example /;
    }
}

Tomcat의 server.xml의 <Connector/>Apache Proxy Module와 같다.

<!-- proxyName 과 proxyPort를 지정해야만 한다. -->
<Connector proxyName="www.example.com" proxyPort="80" port="8080" protocol="HTTP/1.1" redirectPort="8443" />
nginx/proxy.1351152535.txt.gz · 마지막으로 수정됨: 2012/10/25 17:08 저자 kwon37xi