본문 바로가기
Server

aws ec2 nginx80포트 -> 톰캣 8181 포트 리다이렉트

by kiberd 2020. 11. 5.

https://gdtbgl93.tistory.com/96


nginx 설치후 설정파일에 


 location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
 
 
        proxy_pass http://localhost:8080;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
 
        }
 


톰캣 포트로 맵핑 될수 있게 설정해주면 된다.