본문 바로가기
카테고리 없음

NGINX로 메세지 출력

by 수표 2020. 4. 20.

HTTP

server {
    listen       80 default_server;
    server_name  localhost;
    server_tokens off;

    add_header Content-Type "text/plain";

    return 200 "WEB";
}

 

HTTPS

server {
    listen       443 ssl http2 default_server;
    server_name  localhost;
    server_tokens off;

    ssl_certificate "/etc/ssl/certs/ssl-cert-snakeoil.pem";
    ssl_certificate_key "/etc/ssl/private/ssl-cert-snakeoil.key";

    add_header Content-Type "text/plain";

    return 200 "WEB SSL";
}

댓글