내가 않는 htaccess로 파일을 만들려고 해요 다음 :방법의 .htaccess를 통해 EC2 상태 검사를 허용하는
1은 EC2 상태 확인 URL이 https를 로 리디렉션없이 타격을받을 수 있습니다 2 https가 아닌 모든 트래픽을 https로 리디렉션 3/to/auth/app/public/app (https를 사용)로 리디렉션
항목 2와 3은 정상적으로 작동하지만 상태 점검이 실패하고 서버가 더 이상 응답하지 않습니다 . 여기 내 htaccess로 파일의 내용이다 :
RewriteEngine On
#one attempt that didn't work
#RewriteCond %{HTTP_HOST} !^my\.domain\.com$ [NC]
#RewriteCond %{REQUEST_URI} !^/healthcheck.html$
#RewriteRule^http://my.domain.com/$1 [R=301,L]
#another attempt that didn't work
#RewriteCond %{HTTP_HOST} !$ [NC]
#RewriteCond %{REQUEST_URI} !^/healthcheck.html$
#RewriteRule ^(.*)$ /$1 [L,QSA]
#this works
RewriteRule ^$ https://my.domain.com/auth/app/public/app/ [L]
#this works
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule^https://my.domain.com%{REQUEST_URI} [L]
처음 두 주석 처리 시도가 나는 https://serverfault.com/questions/470015/how-should-i-configure-my-elb-health-check-when-using-namevirtualhosts-and-redir 및 https://serverfault.com/questions/470015/how-should-i-configure-my-elb-health-check-when-using-namevirtualhosts-and-redir/597541#597541에서 발견 예에서있다가
당신이 내가 얻을 수있는 방법 어떤 제안이 있으면 알려 주시기 바랍니다 이 일.
\ .html 중에서 $ : 여기 내 htaccess로 파일의 작업 버전입니다 아무것도 재 작성하지 말고 ('-') 이것을 마지막 규칙으로 삼으십시오. 추가 RewriteConds가 필요하지 않습니다. – CBroe