[ server ][ linux ][ CentOS7 ] nginx + apache-tomcat 설치 및 설정 > linux

본문 바로가기

사이트 내 전체검색

linux

[ server ][ linux ][ CentOS7 ] nginx + apache-tomcat 설치 및 설정

작성일 22-02-04 13:48

페이지 정보

작성자 웹지기 조회 5,211회 댓글 0건

본문

1) jdk 설치

>> yum -y install java-1.8.0

>> java -version

 

2) tomcat 설치

>> yum install -y tomcat* 

>> yum list installed | grep tomcat

 

>> systemctl status tomcat

>> systemctl start tomcat

>> systemctl enable tomcat

>> netstat -ntlp

 

3) nginx 설정

>> vi /etc/nginx/conf.d/default.conf 

아래부분 처럼 설정

    location / {

        #root   /usr/share/nginx/html;

        index  index.html index.htm;

        proxy_pass http://localhost:8080;

    }

 

jsp do 파일의 설정(필요시)

    location ~ \.jsp$ {

        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;

    }

    location ~ \.do$ {

        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;

    }

 

 

 >> systemctl restart nginx

 


추천0

비추천 0

댓글목록

등록된 댓글이 없습니다.

전체 103건 1 페이지

이미지 목록

게시물 검색
Copyright © 즐거운 코딩 생활 ( funyphp ). All rights reserved.
PC 버전으로 보기