
다른 프런트엔드/다른 포트에 액세스하기 위해 두 개의 주소를 구성하려면 어떻게 해야 합니까? 예:
주소 | 매핑 대상 |
---|---|
www.mysite.com/config | (nodejs) localhost:3000 |
www.mysite.com/client | (장고) localhost:7000 |
답변1
검색을 이용하세요
- "Apache Proxy"라는 단어를 사용한 경우 다음과 같은 유사한 질문을 발견하게 될 것입니다.
- Docker 컨테이너에 대한 Apache 역방향 프록시
- 그리고 더 많은 유사한 질문
예를 들어 두뇌를 과도하게 사용하지 않는 솔루션
아파치
<VirtualHost *>
ServerName www.example.com
ProxyPass /config http://localname:3000/
ProxyPassReverse /config http://localname:3000/
ProxyPass /client http://localname:7000/
ProxyPassReverse /client http://localname:7000/
</VirtualHost>
Nginx (필요할 경우를 대비해)
location /config {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $http_host;
}
location /client {
proxy_pass http://127.0.0.1:7000;
proxy_set_header Host $http_host;
}