linux Data List

/ 목차 /
- SSL란
- NGINX SSL 설치방법
- NGINX SSL 설정
SSL란
HTTPS (Hypertext Transfer Protocol Secure)는 웹 서버와 웹 브라우저 간에 데이터를 전송하는 데 사용되는 HTTP의 보안 버전입니다. 이는 SSL(Secure Sockets Layer) 또는 최신 버전인 TLS(Transport Layer Security) 프로토콜을 사용하여 데이터를 암호화하고 웹 통신을 보호합니다. SSL은 웹 사이트와 사용자 간의 통신을 암호화하여 제3자로부터 데이터의 유출 또는 변조를 방지합니다. 또한 SSL 인증서를 사용하여 웹 사이트의 신원을 확인하고 사용자에게 안전한 연결을 제공합니다. SSL 인증서는 신뢰할 수 있는 인증 기관(Certificate Authority)에 의해 발행되며, 웹 사이트의 도메인과 공개 키, 발급 기관의 정보 등을 포함합니다. 웹 사이트에 SSL을 적용하면 사용자 브라우저는 신뢰할 수 있는 인증 기관의 목록에서 해당 인증서를 확인하여 안전한 연결을 확립합니다. 이로써 사용자와 웹 사이트 간의 모든 데이터는 암호화되어 누구나 이를 엿볼 수 없게 됩니다. 웹 사이트의 주소는 "https://"로 시작하며, 브라우저에는 보안 잠금 아이콘이 표시됩니다.NGINX SSL 설치방법
인증서 발급 : https://www.sslcert.co.kr/ 7천원에 진행 하였습니다. 메일로 전달받은 Private key 파일 /etc/nginx/ssl 해당 폴더 생성 후 파일 복사합니다.NGINX SSL 설정
/etc/nginx/conf.d/도메인.confcode listen 80; listen 443 ssl; server_name 도메인 ssl_certificate_key /etc/nginx/ssl/파일.key.pem; ssl_certificate /etc/nginx/ssl/파일.unified.crt.pem; ssl_protocols TLSv1.2; #access_log /var/log/nginx/host.access.log main; location / { if ($host !~ ^( 도메인 )$) { return 403; } proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; proxy_pass http://localhost:3000; }
Comment