Configure Apache with multiple ProxyPass

前端 未结 2 2156
醉话见心
醉话见心 2021-02-18 19:25

i am trying to configure my apache server as proxy to serve two internal services , one listening on 8080 and should receive traffic on specific URL and the other listening on 8

2条回答
  •  北海茫月
    2021-02-18 19:59

    You may write ssl.conf file under /etc/apache2/sites-enabled/ as follows:-

    RewriteEngine on
    ProxyPass /webhook1 http://127.0.0.1:8080/
    ProxyPassReverse /webhook1 http://127.0.0.1:8080/
    RewriteRule ^/$ /webhook1/ [R,L]
    
    RewriteEngine on
    ProxyPass / http://127.0.0.1:8087/
    ProxyPassReverse / http://127.0.0.1:8087/
    RewriteRule ^/$ /EP2/ [R,L]
    

    It will automatically redirects to HTTPS if ssl certificate is configured in apache2.

提交回复
热议问题