hoony's web study

728x90
반응형

Azure 에 이제 Nginx 도 설치를 했으니 이제 기존에 설치를 했던 tomcat 이 같이 연동되도록 설정해보도록 하겠다. 

먼저  Nginx 의 설정 파일을 수정해보도록 하겠다. 

1. default  설정 파일 

sudo vi /etc/nginx/sites-available/default


2. 설정 파일 중 location 수정 

 location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                proxy_pass http://localhost:8080;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                #try_files $uri $uri/ =404;
        }


기존의  #try_files $uri $uri/ =404; 은 주석처리하면 된다. 

3. nginx 재시작 

sudo service nginx restart
728x90

공유하기

facebook twitter kakaoTalk kakaostory naver band
loading