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

23번째 줄: 23번째 줄:


==참고==
==참고==
* {{위키백과}}
* https://github.com/varnish/hitch/wiki/FAQ


[[분류: HTTP]]
[[분류: HTTP]]
[[분류: Varnish]]
[[분류: Varnish]]

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

1 개요

Varnish HTTP→HTTPS 넘겨주기
Varnish HTTP to HTTPS redirection
sub vcl_recv {
        if (std.port(local.ip) == 80) {
            return (synth(720));
        }
        # ...
}
sub vcl_synth {
    if (resp.status == 720) {
        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 }}