2014-10-29 4 views
1

AWS와 함께 탄력적 인 beanstalk를 사용하고 있습니다. https에 배포하려고하는 java/tomcat 응용 프로그램이 있습니다. 나는 거의 2 일 동안 https를 얻고 거의 성공하지 못하게하려고 노력했다. 내가 한 일과 내가보고있는 일이 일어난다.ec2가 AWS beanstalk가있는 443에서 응답하지 않습니다.

1. I bought and created a ssl certificate that I installed with my load balancer. 
2. I pointed 443 in load balancer security to 80 as the instructions stated and I've also tried pointing it to 443,8443,4443 
3. In my security group for my beanstalk instance, I enabled 443 to all external ips 
4. In beanstalk I turned on port 443 

지금 나는 정말 혼란 스럽다.

1. As long as I don't try and secure my entire application, I'm able to get ssl working in my apps admin accounts without issue. The app will automatically redirect the protocol from http to https. 
2. Oddly enough I'm outputting the active port and no matter if I'm in http or https, the app is seeing the active port as 8080. How could this be if the load balancer is suppose to be using 443? Also, how would the ssl certificate work on port 8080 or is the ssl certificate working somehow on the load balancer side and the load balancer is doing some sort of port forwarding to the ec2 instance? 
3. If I attempt to secure the entire application doing a forced redirect to https from http. The app fails to load. I've tried redirecting to 443,8443,4443 without success. I need to do this redirect in order to tell google my pages have moved from 80 to 443. 

아무도 내 상황이 어떻게되는지 또는 어떻게 작동하는지 이해하지 못합니까?

응용 프로그램 환경 클릭에서

답변

1

>>구성 다음 네트워크 계층에 드롭을 스크롤 속성을 균형 로드를 편집 할 수 있습니다.

보안 수신기 포트의 경우 443을 선택하고 프로토콜의 경우 HTTPS를 선택하고 마지막으로로드 밸런서에 이전에 추가 한 것으로 인증합니다.

enter image description here

귀하의 질문에 대답하려면 SSL 인증서는 포트 443에서 서버 (들)에 8080에 전달하는 모든 트래픽 부하 분산에 설치됩니다. Elastic Beanstalk로드 밸런서가 포트 8080으로 전달할 것이고 애플리케이션이 듣고있는 것으로 의심되는 443 포트로 전달하지 않기 때문에 애플리케이션에서 443을 강제 실행하면 앱이 중단됩니다.

+0

감사합니다. 정말로 정확합니다. 로드 밸런서가 URL 프로토콜을 기반으로하는 포트가 아닌 8080으로 모든 요청을 전달한다는 사실을 깨닫고 어젯밤에 문제를 해결할 수있었습니다. AWS는 이러한 행동을보다 잘 문서화해야합니다. 다른 질문 일지 모르지만, 페이지가 안전하다고 생각하는지 여부를 앱이 어떻게 구분하는지 생각하면 안됩니다. 예를 들어 페이지 a는 링크가있는 비보안 페이지이며 그 중 하나는 보안 페이지를 가리 킵니다. 페이지를 렌더링하는 동안 http 포트 8080에서 모든 작업이 완료되면 보안 페이지를 가리키는 것을 어떻게 알 수 있습니까? –

관련 문제