2
votes

I have an Apache HTTP server runing on an open 80 port and a Tomcat server running on 8080 closed port.

I can get internally the tomcat webpage using lwp-request 127.0.0.1 8080.

I don't have access to httpd.conf so i tried to configure a ProxyPass on the .htaccess file.

What i need is that the user who enters http://www.mydomain.com/tomcat can see the html generated by the tomcat server

I used this line in the .htaccess:

ProxyPass tomcat/ http://127.0.0.1:8080/

But the only thing i get entering http://www.mydomain.com/tomcat is an error 500

What am i doing wrong?

1
You see anything in your apache or tomcat logs? - Jon Lin
i have no access to the apache http server dir, i can't see the logs nor httpd.conf file - Ulises Layera

1 Answers

7
votes

proxypass and proxypassReverse are available only in the server config and virtual host contexts.

in case you don't have access to the config files or whatever else reason, you could use mod_rewrite with the P flag which does the same.

your .htaccess file should then look like

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule tomcat/ http://127.0.0.1:8080/ [P]
</IfModule>