[Linux] Nginx로 Proxy Server 구성하기

on_cloud·2024년 1월 7일
0

Linux

목록 보기
6/6
post-thumbnail
  1. Nginx Package를 설치합니다.
yum install -y nginx
  1. Nginx를 시작합니다.
systemctl enable --now nginx
  1. Nginx.conf파일을 수정합니다.
vim /etc/nginx/nginx.conf
server {
        listen       80;
        listen       [::]:80;
        server_name  <WAS CIDR>;
        root         /usr/share/nginx/html;
        location / {
        	proxy_pass http://<WAS CIDR>:<Port>/<Path>;
        }
        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;

        error_page 404 /404.html;
        location = /404.html {
        }
  1. Nginx를 재시작합니다.
systemctl restart nginx
profile
클라우드 엔지니어가 목표인 학생

0개의 댓글