Rewrite Rule

Alles, was den Apache betrifft, kann hier besprochen werden.

Rewrite Rule

Postby raffaele.fabbri » 19. May 2018 15:19

hi,
I try to configure a virtualhost in Apache to access to tomcat host-manager console and to the manager to each tomcat host.

Apache virtualhost is configured as follows
Code: Select all
<VirtualHost *:80>
    DocumentRoot "/www/admintomcat"
    ServerName admintomcat.home.loc

    ProxyPass /lh/host-manager          http://localhost:8080/host-manager
    ProxyPass /hosta/manager            http://hosta:8080/manager
    ProxyPass /hostb/manager            http://hostb:8080/manager

    # Other directives here
</VirtualHost>


If I access from browser to url

http://admintomcat.home.loc/lh/host-manager/html
http://admintomcat.home.loc/hosta/manager/html
http://admintomcat.home.loc/hostb/manager/html

goes fine, but when I click on start or stop link of the console goes wrong because the url il wrong.

http://admintomcat.home.loc/host-manager/html/stop;jsessionid=B5821C6E52D18B204815D6E3AB84652D?name=hosta&org.apache.catalina.filters.CSRF_NONCE=87D2BEBBA645B38C8FFD154F9CFEE8B6

because it maigth be

http://admintomcat.home.loc/lh/host-manager/html/stop;jsessionid=B5821C6E52D18B204815D6E3AB84652D?name=hosta&org.apache.catalina.filters.CSRF_NONCE=87D2BEBBA645B38C8FFD154F9CFEE8B6

I think I have to add a rewrite rule but I am dummies on the matter, somebody can help me?
thank's in advance.
Sorry for my bad english
Raffaele
raffaele.fabbri
 
Posts: 1
Joined: 18. May 2018 20:22
XAMPP version: 7
Operating System: Linux

Return to Apache

Who is online

Users browsing this forum: No registered users and 4 guests