LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   apache not taking database from tomcat on redirect (https://www.linuxquestions.org/questions/linux-server-73/apache-not-taking-database-from-tomcat-on-redirect-4175453280/)

mlnm 03-08-2013 10:20 AM

apache not taking database from tomcat on redirect
 
Hi,i am trying to redirect apache to tomcat.I have web application in tomcat on 8080 and www.mydomain.com domain on apache (httpd) on 80.I redirected using mod_proxy like this
ProxyPass / http://localhost:8080/myapp/
ProxyPassReverse / http://localhost:8080/myapp/

On querying for http://www.mydomain.com ,im getting the login page of my webapplication but after entering credentials it gives 404 error.

But the webapplication working fine on tomcat http://localhost:8080/myapp

Detais:
Server : RHEL 5
Mysql : 5.5
Apache 2.2
Tomcat : 7.0.37
Valid suggestions would be greatly appreciated,
Thank you..

acid_kewpie 03-09-2013 07:03 PM

"http://localhost:8080/myapp" is NOT the same as "http://localhost:8080/myapp/". The trailing slash matters completely.

mlnm 03-10-2013 01:11 AM

Thank you for your response ,actually i have tried it without slash(/) but then even the login page was not showing ,just gave 404 error.After adding / the login page of web application is now showing.

The apache(httpd) log shows following error
Directory index forbidden by Options directive: /var/www/html/

acid_kewpie 03-10-2013 05:38 AM

if you're getting the apache 404 then you're not hitting the redirect at all. what's the actual config say?

mlnm 03-10-2013 11:09 PM

Actually my web application is deployed in tomcat and has a MySQL database in the back-end.So on redirection i am getting the login page which is static and not getting the website which takes database from MySQL. SeLinux is disabled.But when i redirect the other project in the same way it takes the database.i think ,if redirect is not happening i shouldn't get the login page also.And also another i am unable to understand is that ,when this project works on tomcat why cant it work on apache because i am just redirecting through a simple mod_proxy method.


All times are GMT -5. The time now is 08:53 AM.