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

본문 바로가기
사이트 내 전체검색

linux

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

작성자 웹지기
작성일 22-02-04 13:48 | 조회 11,592 | 댓글 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

댓글목록 0

등록된 댓글이 없습니다.

linux 목록

Total 103
게시물 검색

회원로그인

접속자집계

오늘
23,127
어제
17,832
최대
61,067
전체
17,962,239

그누보드5
Copyright © www.funyphp.com. All rights reserved.