0

I have some trouble with Apache and Tomcat server inside same machine. I want redirect a virtual host, kb.domain to an tomcat app kb.

I have read some post on internet but I don't found a solution to my problem.

My configuration have one Apache server (http://domain) and in same machine an tomcat server (http://domain:8080); in my Apache I have mapped a VirtualHost that respond to kb.domain like this:


    <VirtualHost *:80>
    ServerName kb.domain

    <Location />
    ProxyPass http://192.168.200.3:8080/kb
    ProxyPassReverse http://192.168.200.3:8080/kb
    </Location>
    </VirtualHost>

When I call the kb.domain url from browser he add an extra / at the end and go into redirect loop.

Can anyone help me?

Thanks

stefanopulze
  • 59
  • 2
  • 10

2 Answers2

1

Your proxpass directives should be:

ProxyPass / http://192.168.200.3:8080/kb/
ProxyPassReverse / http://192.168.200.3:8080/kb/
Jon Lin
  • 142,182
  • 29
  • 220
  • 220
0

try

<VirtualHost *:80>
    ServerName kb.domain

    ProxyPass /kb http://localhost:8080/kb
    ProxyPassReverse /kb http://localhost:8080/kb

</VirtualHost>

If you want to pass regardless of path ( aka not /kb )

<VirtualHost *:80>
    ServerName kb.domain

    ProxyPass / http://localhost:8080
    ProxyPassReverse / http://localhost:8080

</VirtualHost>
MikePatel
  • 2,593
  • 2
  • 24
  • 38