1

Let's say I have three applications on my server: node-red (1880), jupyter (8888) and pgadmin (5433)... I can successfully create a localhost proxy pass with them individually as the following:

<VirtualHost *:80>
ServerName 127.0.0.1
&lt;Location &quot;/&quot;&gt;
    ProxyPass http://127.0.0.1:1880/
    ProxyPassReverse http://127.0.0.1:1880/
&lt;/Location&gt;

</VirtualHost>

I've realized all three of them work fine if I try to put them on the "/" location. However, if I try to put them in unique locations as the following:

<VirtualHost *:80>
ServerName 127.0.0.1

&lt;Location &quot;/nodered/&quot;&gt;
    ProxyPass http://127.0.0.1:1880/
    ProxyPassReverse http://127.0.0.1:1880/
&lt;/Location&gt;

&lt;Location &quot;/jupyter/&quot;&gt;
    ProxyPass http://127.0.0.1:8888/
    ProxyPassReverse http://127.0.0.1:8888/
&lt;/Location&gt;

&lt;Location &quot;/pgadmin/&quot;&gt;
    ProxyPass http://127.0.0.1:5433/
    ProxyPassReverse http://127.0.0.1:5433/
&lt;/Location&gt;

</VirtualHost>

None of them work on their respective addresses http://127.0.0.1/nodered/, http://127.0.0.1/jupyter/ or http://127.0.0.1/pgadmin/... I don't know what concepts I'm missing to make this work. I think I have to use RewriteRule but I'm not sure how. Is there any generic solution to deal with this kind of situation? Or do I need to know the particularities of each application I'm trying to proxy pass to make it work?

raylight
  • 111
  • 4

0 Answers0