HTTP(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 아차피 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 -
[리눅스] CentOS 7 아파치와 톰캣 연동처리하기
> /etc/httpd/modules> find ./ -name '*mod_jk.so' mod_jk.so 라이브러리가 있어야 아파치접속시 톰캣으로 리다이렉트 처리해줄수 있다.없다면 설치 > yum install gcc gcc-c++ httpd-devel> wget --no-check-certificate https://dlcdn.apache.org/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.48-src.tar.gz> tar -zxvf tomcat-connectors-1.2.48-src.tar.gz> ./configure --with-apxs=/usr/bin/apxs> make && make install 출처: https://offbyone.tistory.c..
2022.01.20 -
[리눅스] 아파치 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