LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-08-2013, 10:20 AM   #1
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Rep: Reputation: Disabled
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..
 
Old 03-09-2013, 07:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
"http://localhost:8080/myapp" is NOT the same as "http://localhost:8080/myapp/". The trailing slash matters completely.
 
Old 03-10-2013, 01:11 AM   #3
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
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/
 
Old 03-10-2013, 05:38 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
if you're getting the apache 404 then you're not hitting the redirect at all. what's the actual config say?
 
Old 03-10-2013, 11:09 PM   #5
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to connect to database while redirecting apache to tomcat mlnm Linux - Newbie 2 10-23-2012 06:43 AM
cannot connect to mysql database while redirecting apache to tomcat mlnm Linux - Newbie 1 07-19-2012 09:49 AM
Redirect a tomcat application URL and port using apache. sudheshpn Linux - Software 5 06-17-2011 03:51 PM
redirect site from apache to tomcat carlainz Linux - Server 1 12-09-2006 03:41 AM
How to redirect apache to tomcat? gepesz Linux - General 0 07-29-2004 09:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration