My frontend server is handled by Apache 2.4.
I would like that when accessing http://198.51.100.13/site1/, it automatically redirects the traffic to my server's port 1001 like this:
Require all granted
RewriteRule ^/site1(.*)$ http://localhost:1001$1 [P,L]
RewriteRule ^/site2(.*)$ http://localhost:1002$1 [P,L]
RewriteRule ^/site3(.*)$ http://localhost:1003$1 [P,L]
Problem: I get this error when opening http://198.51.100.13/site1/:
You don't have permission to access /areallybigpage on this server.
On the other hand, if I do http://198.51.100.13:1001/, it works (there is a Python serveron port 1001, but this is not important for this question).
How to solve this?