proxy1 - centos7 + apache환경에 node.js 연동

 

1. httpd.conf 설정

<VirtualHost *:80>
DocumentRoot /home/test/public_html
ServerName test.com

<Directory /home/test/public_html>
AllowOverride All
Require all granted
</Directory>

ProxyRequests Off
ProxyPreserveHost On

<Location /chats>
ProxyPass http://test.com:8000/
ProxyPassReverse http://test.com:8000/
</Location>

</VirtualHost>

 

주요코드

  ProxyRequests Off
  ProxyPreserveHost On

 

#주소가 test.com/order일때, 프록시 변경해줌

<Location /order>
    ProxyPass http://order.playon.tistory.com/
    ProxyPassReverse http://order.playon.tistory.com/
  </Location>

 

 

출처

https://playon.tistory.com/87

댓글

Designed by JB FACTORY