검색을 이용하세요

검색을 이용하세요

다른 프런트엔드/다른 포트에 액세스하기 위해 두 개의 주소를 구성하려면 어떻게 해야 합니까? 예:

주소 매핑 대상
www.mysite.com/config (nodejs) localhost:3000
www.mysite.com/client (장고) localhost:7000

답변1

검색을 이용하세요

예를 들어 두뇌를 과도하게 사용하지 않는 솔루션

아파치

<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;
}

관련 정보