Web Server/nginx(23)
- 
                
                  
                  Nginx proxy에서 client IP를 backend에 전달하기
server { listen 443 ssl; listen [::]:443 ssl; server_name www.test.co.kr; client_max_body_size 0; location / { proxy_pass http://spring-boot-service; # Forward headers 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-Proto $scheme..
2024.12.29 - 
                
                  
                  nginx tcp proxy 설정
stream { server { listen {port}; proxy_connect_timeout 60s; proxy_socket_keepalive on; proxy_pass {proxy 접속정보}; }}
2024.05.04 - 
                
                  
                  nginx 컴파일해서 설치하기: nginx tcp proxy 서버 구성
https://velog.io/@zuckerfrei/Nginx-TCP-Proxy-%EC%84%9C%EB%B2%84 Nginx TCP Proxy 서버 nginx로 tcp proxy 서버 구축 velog.io nginx plus에서 제공되는 기능 apt를 통해서 설치한 기본 nginx에서는 기능을 제공하지 않음 --with-stream를 써서 컴파일해야 함 설치 재작업을 해도 기존에 존재하는 nginx.conf를 덮지 않음 # 파일 다운로드 wget https://nginx.org/download/nginx-1.24.0.tar.gz # 압축 해제 tar -zxvf nginx-1.24.0.tar.gz # 컴파일 ./configure \ --prefix=/etc/nginx \ --sbin-path=/usr/sb..
2024.03.11 - 
                
                  
                  nginx header 정보 제거
https://gist.github.com/aamishbaloch/1031e7490d7d57d55baff57fce8d2997 Remove Server Details from Response Header - Nginx Remove Server Details from Response Header - Nginx - remove_server_details.md gist.github.com # 버전정보 제거 vi nginx.conf ----------------------------- http { server_tokens off; } ----------------------------- # 서버종류 제거 sudo apt-get update sudo apt-get install nginx-extras vi ngin..
2024.03.01 - 
                
                  
                  nginx와 minikube ingress 연동
DNS 등록 hosts 파일이나 DNS에 등록 ------------------------------------ {minikube가 설치된 PC IP} pod.test.co.kr {minikube가 설치된 PC IP} node.test.co.kr ------------------------------------ ingress 등록 # pod ingress apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: pod-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: /$1 spec: rules: - host: pod.test.co.kr http: paths: - path: / pat..
2024.02.03 - 
                
                  
                  nginx 인증 설정
HTTP Basic Authentication https://www.howtogeek.com/devops/how-to-setup-basic-http-authentication-on-nginx/ How to Set Up Basic HTTP Authentication in NGINX Basic username and password authentication is an easy and simple way to secure administrative panels and backend services. Nginx can be configured to protect certain areas of your website, or even used as a reverse proxy to secure other serv..
2023.06.10