테스트 사이트 - 개발 중인 베타 버전입니다

nginx http -> https 리다이렉트 순환오류

흑빛 10년 전 조회 6,355
server {
    listen 80;
    listen 443;
    server_name site.com http://www.site.com;">www.site.com;
    ssl on;
    ssl_certificate /etc/nginx/conf.d/ssl-unified.crt;
    ssl_certificate_key /etc/nginx/conf.d/ssl.key;
    root /var/www/site/public_html;
    index index.html index.php;
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
    }
    if ($scheme = http) {
    }
}
site.com http://www.site.com">www.site.com 으로 들어오면 https://site.com">https://site.com 으로 리다이렉트 시킬려고 하는데
https://site.com">https://site.com 으로 리다이렉트는 되는데 거기에서 페이지 못찾고 
계속 리다이렉트 순환 오류가 발생하네요
    if ($scheme = http) {
    }
이 구문만 빼면 리다이렉트는 안되지만 페이지는 http https 둘다 잘 뜨고요

왜 순환 오류가 발생 하는 걸까요 ㅠㅡ
댓글을 작성하려면 로그인이 필요합니다.

답변 1개

10년 전
if 문에서  = 이  하나인가요??
로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인