"Varnish HTTP to HTTPS 넘겨주기"의 두 판 사이의 차이

6번째 줄: 6번째 줄:
sub vcl_recv {
sub vcl_recv {
     if (std.port(local.ip) == 80) {
     if (std.port(local.ip) == 80) {
         return (synth(720));
         return (synth(700));
     }
     }
}
}
sub vcl_synth {
sub vcl_synth {
     if (resp.status == 720) {
     if (resp.status == 700) {
         set resp.http.location = "https://" + req.http.host + req.url;
         set resp.http.location = "https://" + req.http.host + req.url;
         set resp.status = 302;
         set resp.status = 302;

2018년 7월 17일 (화) 07:15 판

1 개요

Varnish HTTP→HTTPS 넘겨주기
Varnish HTTP to HTTPS redirection
sub vcl_recv {
    if (std.port(local.ip) == 80) {
        return (synth(700));
    }
}
sub vcl_synth {
    if (resp.status == 700) {
        set resp.http.location = "https://" + req.http.host + req.url;
        set resp.status = 302;
        return (deliver);
    }
}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}