LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2012, 02:52 PM   #1
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Rep: Reputation: Disabled
uanble to open my web app through apache


Hi,
I have apache 2.x webserver and tomcat 7.
I deployed a webapp under tomcat webapps and its working fine on http://localhost:8082/myapp
I redirected my apache to tomcat by adding :
ProxyPass / http://localhost:8082/
ProxyPassReverse / http://localhost:8082/
then i was able to get ROOT default page of tomcat by
http://mywebsite.com
but when i direct it to my webapp like:

ProxyPass /myapp http://localhost:8082/myapp
ProxyPassReverse /myapp http://localhost:8082/myapp
default RED HAT apache web server page opens on
http://mywebsite.com
but http://mywebsite.com/myapp is taking me to my application page.
But i want my app to be open on
http://mysite.com
Please give your valid suggestions.I hope some one gives wright solution.
thanks in advance...
 
Old 06-19-2012, 02:00 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
But i want my app to be open on
http://mysite.com
You can use:
Code:
ProxyPass / http://localhost:8082/myapp/
ProxyPassReverse / http://localhost:8082/myapp/
Regards
 
Old 06-19-2012, 08:57 AM   #3
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
Thanks for your reply...
I have already tried it but it shows error message like this:
404 error
description:The requested resource(/myappmyapp/)not found.
 
Old 06-19-2012, 11:16 AM   #4
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
i gone through apache logs\error_logs and i got this error over there:

[error] [client <server ip>] Directory index forbidden by Options directive: /opt/apache-tomcat-7.0.27/webapps/myapp
 
Old 06-19-2012, 03:50 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by mlnm View Post
Thanks for your reply...
I have already tried it but it shows error message like this:
404 error
description:The requested resource(/myappmyapp/)not found.
Are you sure you add the trailing slash in the proxied URL (i.e. the trailing slash after myapp)? Take a look again at my previous post


Quote:
i gone through apache logs\error_logs and i got this error over there:

[error] [client <server ip>] Directory index forbidden by Options directive: /opt/apache-tomcat-7.0.27/webapps/myapp
Today 16:57
Does not make sense. Unless you use an Alias to /opt/apache-tomcat-7.0.27/webapps/myapp
 
Old 06-19-2012, 05:13 PM   #6
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
I had /opt/apache-tomcat-7.0.27/webapps/myapp in my document root,i removed it and tried your suggestion and it worked out.I dont have any virtual hosts defined and only one web server redirecting at one tomcat.At first i tried it with /var/www/html in
document root,but i didnt work out,i had gone through many tutorials and in some of them they told to change document root to tomcat's web application path ,so i did that,but i was running of clues tried the proxy syntax in every possible way and finally this is how i got with your help:
ProxyPass / http://localhost:8080/myapp/
ProxyPassReverse / http://localhost:8080/myapp/
(i have changed my tomcat port again to default)
so i have made two changes :
1.taked out /opt/apache-tomcat-7.0.27/webapps/myapp from DocumentRoot and <Directory> parts and replaced them with default "/var/www/html" .
2.Added / at end of myapp: /myapp/
And dear Sir i really thank full to you for your replies and all the help you have given... Thank you so much....
(And the moral i learnt from this exp is that, one should think logically but not blindly follow the tutorials)
 
  


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
LXer: Mozilla preempts Google with 'open' web app store prototype LXer Syndicated Linux News 0 10-20-2010 06:50 PM
LXer: Build an Ajax app using Googel Web Toolkit, Apache Derby, and Eclipse LXer Syndicated Linux News 0 12-05-2006 08:03 PM
LXer: Web-app Network Team releases latest open source Perl CMS LXer Syndicated Linux News 1 10-25-2006 09:52 AM
LXer: Web Apps Get New Open-Source App Server LXer Syndicated Linux News 0 07-03-2006 09:21 AM
LXer: Web Apps Get New Open Source App Server LXer Syndicated Linux News 0 06-30-2006 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:13 PM.

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