apache

[CentOS Linux] 아파치 인증서 설치 및 Proxy 설정 - 4

xemaker 2021. 2. 23. 19:36

아파치 가상호스트 설정

가본 80포트가 아닌 8081,8082를 써야할 경우 가상호스트 설정

httpd.conf 를 vi로 열고
상단에
Listen 8081
Listen 8082


ServerName 1.1.1.1
DocumentRoot "/var/www/html"


설정을 마쳤으면 웹서버를 다시 시작한다.
apachectl restart

/var/www/html/index.html 파일을 만들어 test8081 라고 쓰고 저장.

curl -X GET http://1.1.1.1:8081/

test8081 이라고 찍힌다.


ServerName 1.1.1.1
DocumentRoot "/var/www/html2"


/var/www/html2/index.html 파일을 만들어 test8082 라고 쓰고 저장.

curl -X GET http://1.1.1.1:8082/

test8081 이라고 찍힌다.

웹브라우저에서 테스트 해도 된다.