IT/Linux OS
[Nginx]Nginx 설치 및 Reverse Proxy설정
kimdragon
2021. 5. 26. 09:35
반응형
Topic
- Nginx 설치
- Nginx reverse Proxy설정
NginX 설치
- Amazon linux2 OS기준
- Amazon linux2는 별도의 amazon-linux-extras 라이브러리를 통해 다양한 소프트웨어를 제공하고 있음
## 설치할 Nginx 찾기
amazon-linux-extras list | grep nginx
## Nginx 설치
sudo amazon-linux-extras install -y nginx1
Reverse Proxy설정
server {
listen 80;
server_name <my-domain.com>;
location / {
proxy_pass 10.10.1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
send_timeout 300s;
}
}
반응형