Reverse proxy with Apache2 not working

Hello, i had octopi installed on my raspberry pi 3, it works perfectly with my ender 3 locally.
My problems started when using my raspberry pi 4 i used apache2 reverse proxy to connect to host/ octopi. I used the guide in this site, I tried modifying myself, but anytime i try, i'm not able to login. I tried different browser, clearing cache.

<Location /octopi>
    ProxyPassReverseCookiePath http: /octopi
    RequestHeader set X-SCRIPT-NAME /octopi
    RequestHeader set X-SCHEME https
    Order allow,deny
    Allow from all
    RewriteEngine on
    RewriteCond %{HTTP:UPGRADE} =websocket [NC]
    RewriteRule /octopi/(.*) ws://$1 [P,L]
    RewriteCond %{HTTP:UPGRADE} !=websocket [NC]
    RewriteRule /octopi/(.*)$1 [P,L]

As you can see, the pi3 is and the pi4 is exposed on the internet.
You know what can i do?

EDIT:the problem does not appear if i use /octoprint/ instead of /octopi/