Hello, My issue is a little bit outside ISPConfig configuration. But it is linked with my server conf with ISP I am trying to set up a proxy: my backend : http://127.0.0.1:3000 extract of my vhost.conf : ProxyRequests Off ProxyPreserveHost On <Proxy *> AuthUserFile /etc/backend/back.htpswd AuthName "Service" AuthType Basic Require valid-user Options None </Proxy> ProxyPass "/" "http://localhost:3000/" connectiontimeout=10 timeout=300 keepalive=on ProxyPassReverse "/" "http://localhost:3000/" This works very well. I access it at : myvhost.tld But, I would like to acces it at : myvhost.tld/service So I edit my vhost.conf : ProxyRequests Off ProxyPreserveHost On <Proxy *> AuthUserFile /etc/backend/back.htpswd AuthName "Service" AuthType Basic Require valid-user Options None </Proxy> ProxyPass "/service" "http://localhost:3000/" connectiontimeout=10 timeout=300 keepalive=on ProxyPassReverse "/service" "http://localhost:3000/" It doesn't work ! curl http://localhost:3000/ answers "Found. Redirecting to /cluster/ns" In my browser, I see : myvhost.tld/cluster/ns instead of myvhost.tld/service/cluster/ns I try modify ProxyPassReverse, add Rewriterules, Redirect Permanent... without any success !
May be there is no solution... If there is, could you tell me where to look for : rewriterules, or ???
Put your ProxyPass* directives in a <Location>: Code: <Location /service> ProxyPass "http://127.0.0.1:3000" ProxyPassReverse "http://127.0.0.1:3000" ProxyPreserveHost On ProxyPassReverseCookiePath "/" "/service/" </Location>
I tried that code, but, it doesn't work. Behind "http://127.0.0.1:3000", there is nodejs running ! nodejs redirect without taking into account apache conf... I don't understand why, and, how to solve that !
As an example, in firefox : "ns1.domain.tld:8080/service" gives back "ns1.domain.tld:8080/cluster/ns" I rewrite in browser : ns1.domain.tld:8080/service/cluster/ns and it gives that -> attached scripts are not going through "location"...
[edit] sry, my idea that was here was crap. Does this help? https://stackoverflow.com/questions/9368794/how-to-use-vhosts-alongside-node-http-proxy
I fully agree. For a reason I ignore, proxypass seems disabled ! Anyway, I forgot that solution because with ispc3.2.2 patch, it becomes very difficult to call https://server.domain.tld:8080/myservice. It would not work for some service such as opcache (https://raw.githubusercontent.com/rlerdorf/opcache-status) Headers are now very restrictive, what I fully understand regarding security issue !
What mod_proxy* modules do you have enabled? Ensure mod_proxy and mod_proxy_http are loaded, and you might try mod_proxy_html as well (see https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypassreverse). Not sure what you mean, but I assume you mean a node.js opcache? (I don't know much about node.js, sorry.)
It seems you rescue me with that solution ! Thanks a lot Regarding Opcache : that github (https://raw.githubusercontent.com/rlerdorf/opcache-status) helps monitor opcache. It uses external sources. i understood that with ispconfig 3.2.2, it is no more possible to upload that external sources using myisp.domain.tld:8080/opcachestatus ! That is why I change my approach. Thanks so much !