[Apache] Apache Vhost 세팅 (React, SpringBoot) - PM2 배포 시
·
Tech Archive/Apache
React, SpringBoot- 해당하는 도메인을 PM2로 올라간 서비스에 Proxy 처리 HTTP #main domain ServerName test.com #document Root DocumentRoot /var/www/html/test #additional setting #Options FollowSymLinks MultiViews Options -Indexes +FollowSymLinks AllowOverride All require all granted ErrorLog ${APACHE_LOG_DIR}/test.com-error.log CustomLog ${APACHE_LOG_DIR}/tes..
[Apache] Apache Vhost 폴더경로와 ProxyPass 동시 설정
·
Tech Archive/Apache
정적 폴더 경로와 Proxy 설정 예시 #main domain ServerName test.com # 정적 파일 서빙: /build 로 시작하는 요청은 로컬 폴더에서 제공 Alias /metaverse /var/www/html/test/metaverse Options Indexes FollowSymLinks AllowOverride None Require all granted ProxyRequests Off ProxyPreserveHost On # 정적 파일 외의 모든 요청은 프록시로 넘김 ProxyPassMatch ^/(?!metaverse)(.*)$ http://localhost:23417/$1 Pro..
[Apache] Reverse Proxy 사용 포트포워딩 설정하기
·
Tech Archive/Apache
외부에서 접속했을때 내부서버의 다른 포트나 다른곳으로 연결해주기위해Reverse Proxy를 사용한다여러 방법이 있지만 Apache 에 기본으로 설치되는 mod_proxy를 사용해 설정 할 수 있다. mod_proxy 모듈 설정#LoadModule proxy_module modules/mod_proxy.so#LoadModule proxy_http_module modules/mod_proxy_http.so- /apache/conf/httpd.conf 파일을 열어 주석된 부분을 풀어주거나 없으면 추가해준다 httpd.conf 파일 수정 ServerName test.com ProxyRequests Off ProxyPreserveHost On ProxyPass / http://localhost:8080..
[Apache] Apache Tomcat 연동
·
Tech Archive/Apache
Tomcat도 단독으로 서비스를 할 수 있으나 Apache와 연동하여 사용하는 경우가 많다. Apache와 연동하여 사용하는 이유정적 콘텐츠의 서비스 속도(이미지 동영상의 경우 Apache가 빠름)여러 대의 Apache와 Tomcat서버의 클러스터링 구성Apache 웹서버의 다양한 모듈 확장보안 강화 1. mod_jk 설치 c 컴파일러 설치 안 돼있을 경우$ yum install gcc gcc-c++ httpd-devel위 명령어를 사용하여 3가지 패키지를 모두 설치 tomcat.apache.org/download-connectors.cgi Apache Tomcat® - Tomcat Connectors (mod_jk) DownloadsYou must verify the integrity of the do..
[Linux] Apache 설치
·
Tech Archive/Linux(CentOS)
yum list installed | grep httpd 위 명령어를 통해 아파치가 설치 되어있는지 확인 yum install -y httpd 설치되어 있지 않다면 위 명령어로 설치 설치가 완료되면 /etc/httpd 의 경로로 설치됨 설치 완료후 방화벽 설정을 해준다 firewall-cmd --permanent --add-service=http firewall-cmd --permanent --add-service=https firewall-cmd --reload http(80)와 https(443) 를 추가해준다 서비스를 활성화 시키고 부팅시 실행되도록 설정한다 systemctl enable httpd systemctl start httpd 아파치를 실행시키고 주소창에 ip를 입력해 접속하면 위와같은 ..