본문 바로가기

Nginx21

Nginx를 사용한 CONNECT 프록시 설정 가이드 Nginx를 사용하여 HTTPS CONNECT 요청을 통해 웹사이트에 연결하기 위한 전체 가이드입니다. 이 가이드에는 Nginx의 기본 설치, 모듈 설치, 설정 방법, 예제 내용 및 각 옵션의 설명이 포함되어 있습니다. Nginx 설치 Nginx를 설치합니다. (운영 체제에 따라 패키지 관리자를 사용하여 설치할 수 있습니다.) Ubuntu/Debian: sudo apt-get update sudo apt-get install nginx CentOS/RHEL: sudo yum install epel-release sudo yum install nginx Nginx 서비스를 시작하고 부팅 시 자동으로 실행되도록 설정합니다. sudo systemctl start nginx sudo systemctl enabl.. 2023. 10. 14.
Nginx, Gunicorn(WSGI), Django 동작 원리 WSGI(Web Server Gateway Interface)와 관련하여, 웹 애플리케이션 서버의 동작 방식과 역할에 대한 설명을 요약 및 정리해보겠습니다. WSGI의 등장 배경 초기에는 웹 서버만 있었으며, 정적인 파일만 처리 가능했음. 동적인 요청에 대한 처리 필요성 증가. CGI(Common Gateway Interface) 등장: 파이썬 어플리케이션 서버의 동작 방식 정의. CGI는 요청마다 파이썬 스크립트를 처음부터 실행하여 처리하는 방식이어서 성능 이슈 발생. WSGI의 등장과 WSGI 서버(Gunicorn, uWSGI) WSGI(Web Server Gateway Interface) 등장: 웹 서버와 파이썬 어플리케이션 간의 통신 규약. WSGI 서버 필요: 클라이언트의 요청을 받아 WSGI .. 2023. 8. 23.
Nginx와 LDAP를 연동하여 사용자 인증을 구현하는 방법 Nginx와 LDAP를 연동하여 사용자 인증을 구현하는 방법을 설명드리겠습니다. LDAP( Lightweight Directory Access Protocol)은 디렉터리 서비스에 접근하기 위한 프로토콜로, 사용자 정보와 인증 정보를 저장하고 검색하는 데 사용됩니다. 이를 통해 Nginx 웹 서버를 보호하고 액세스를 제어할 수 있습니다. 이제 순서대로 설치와 설정을 진행해보겠습니다. 1. 필요한 패키지 설치 먼저 Nginx와 LDAP 모듈이 필요합니다. Nginx를 설치하고 컴파일하기 전에 다음 패키지를 설치합니다: Nginx Nginx 개발 헤더 (Nginx를 컴파일할 때 필요) LDAP 라이브러리 및 개발 헤더 2. Nginx 컴파일 LDAP 모듈을 포함하여 Nginx를 컴파일합니다. 다음은 컴파일 .. 2023. 7. 28.
NGINX WebSocket proxying To turn a connection between a client and server from HTTP/1.1 into WebSocket, the protocol switchmechanism available in HTTP/1.1 is used.There is one subtlety however: since the “Upgrade” is a hop-by-hop header, it is not passed from a client to proxied server. With forward proxying, clients may use the CONNECT method to circumvent this issue. This does not work with reverse proxying however, s.. 2014. 1. 17.
Restriction of the access with the help of Nginx In this short post the point is how to protect your files and some part of your web site with a user password. With Nginx, a lot of options exist to protect your site with usernames and passwords. In Nginx the solution is not less attractive than in apache. In the configuration file, set folder to close, it is only necessary to load the file with passwords. There are two examples for closing of .. 2009. 10. 13.