728x90
- 리버스 프록시를 설정 방법
etc/httpd/conf/httpd.conf 또는 /etc/apache2/sites-available/000-default.conf와 같은 Apache 설정 파일을 편집하면 된다.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# ========================
# 리버스 프록시 설정
# ========================
# /test1 경로로 들어오는 요청은 127.0.0.1:8080 로 전달
ProxyPass /test1 http://127.0.0.1:8080/
ProxyPassReverse /test1 http://127.0.0.1:8080/
# /test2 경로로 들어오는 요청은 127.0.0.1:8081 로 전달
ProxyPass /test2 http://127.0.0.1:8081/
ProxyPassReverse /test2 http://127.0.0.1:8081/
# ========================
# 로그 설정
# ========================
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
728x90