HTTPS(5)
-
[리눅스] nginx http -> https 세팅 참고 예제
> nginx설치후 아래 설정 적용#user nobody;worker_processes 100; #error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024;} http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' ..
2022.08.22 -
[JAVA] HTTPS통신시 인증서 검증 없이 통신처리하기
코드 제목: SSL 인증서 검증 우회 설정이 코드는 HTTPS 연결을 할 때 SSL 인증서를 검증하지 않도록 설정하는 방법을 보여줍니다. 일반적으로 HTTPS 연결은 서버의 SSL 인증서를 확인하여 해당 서버가 신뢰할 수 있는지 판단합니다. 그러나 이 코드에서는 인증서 검증을 생략하고, 모든 서버 인증서를 신뢰하는 방식으로 설정하고 있습니다. 주로 테스트 환경이나 인증서를 신뢰할 수 없는 서버와의 통신에서 사용할 수 있습니다. 그러나 보안상의 이유로 실제 서비스에서 사용하지 않는 것이 좋습니다.코드 흐름과 설명:1. URL 객체 생성url = new URL(addr);주어진 주소(addr)를 이용해 URL 객체를 생성합니다.이 객체는 우리가 연결하려는 웹사이트나 서버의 주소를 나타냅니다.addr에는 예를..
2022.02.09 -
[리눅스] CentOS 7 https적용하기 (ssl세팅)
openssl로 인증서(crt)와 개인키(key) 생성 하여 특정 경로에 저장 > yum -y install mod_ssl > cd /etc/httpd/conf.d > vi ssl.conf ssl.conf 설정파일 맨 아래에 다음 내용 입력 ServerName {접속 도메인} ServerAlias www.{접속 도메인} SSLEngine on SSLCertificateFile {crt확장자로 되어 있는 인증서 경로}/{인증서명}.crt SSLCertificateKeyFile {key확장자로 되어 있는 인증서 키 경로}/{인증서 키명}.key CustomLog /var/log/httpd/ssl_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"..
2022.01.21 -
[리눅스] CentOS 7 아차피 http 접속시 https 리다이렉트하기
> cd /etc/httpd/conf> vi httpd.confhttpd.conf 설정 파일에 맨 아래에 다음 내용 입력 ServerName {접속할 도메인} ServerAlias www.{접속할 도메인} RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://www.{접속할 도메인}%{REQUEST_URI}
2022.01.21 -
[리눅스] 아파치 httpd https로 접속시 http로 리다이렉트 처리하기
> cd /etc/httpd/conf.d> vi ssl.confssl.conf 설정 파일에 다음 내용 입력 ServerName {접속할 도메인} RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
2021.11.24