LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2006, 06:14 PM   #91
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30

quick question,

what's up with my tomcat and apache right now?
looks like apache is running and tomcat as well.
if I can access my jsp pages like this:
http://www.mydomain.net/WEB/AAA this means that
apache talks to tomcat and tomcat talks to apache.

looks like there is only minor thing is missing

 
Old 05-03-2006, 06:15 PM   #92
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
no, no, no.
no consultants if I can do it myself, with your help of course
 
Old 05-03-2006, 07:45 PM   #93
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
quick question,

what's up with my tomcat and apache right now?
looks like apache is running and tomcat as well.
if I can access my jsp pages like this:
http://www.mydomain.net/WEB/AAA this means that
apache talks to tomcat and tomcat talks to apache.

looks like there is only minor thing is missing

Yep, it does look like Apache and Tomcat do have a connection via mod_jk2 but the Alias you setup might be helping with that. If you setup the mod_jk2 settings, per the Apache doc I linked to, we can see if that will help get what you're after.

Peace...
 
Old 05-03-2006, 11:05 PM   #94
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
I am thinking of stop messing with it. I am not sure if it is worth it going through this.

I do not see the concept of having both servers together. If Tomcat can do both why bother configuring them together?
 
Old 05-04-2006, 02:00 AM   #95
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
I do not see the concept of having both servers together. If Tomcat can do both why bother configuring them together?
Well, if someone already has a web server up and running that they use for other web content, it makes sense to use that for their servlets and JSPs as well. In fact, we had an Apache server and an IIS server up, both using mod_jk and mod_jk2 (different servers on the same machine) connected to Tomcat running on a server 50 mi away which had a database connection to a third machine.

It really depends on what your needs are, which is something you haven't identified in this thread and something I'm not sure you even really know.

If you want to proceed, post the requested output. If not, that's cool too.

Peace...
 
Old 05-04-2006, 11:34 PM   #96
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
hello,
since I do not have anything that you had such as multiple servers and stuff... I think it is reasonable to set pure Tomcat and let it do the job.

I am running everything from home and have one webapp.

Anyway, if i want to have tomcat standalone how would I go with it?
I guess i need to configure Tomcat to listen to port 80, shut apache server down. I am not sure how map my domamin name to ip address though with Tomcat.

Thanks :-\
 
Old 05-05-2006, 04:29 PM   #97
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
If you want to run Tomcat standalone, simply stop Apache from running and edit httpd.conf to remove the mod_jk2 stuff. Then look in server.xml in your Tomcat installation directory tree and you can find where Tomcat listens on port 8080. Change that to 80 and see if that does what you want. Tomcat configuration to server non-Java content (static HTML files, etc) is beyond my scope and you're on your own for that. If you're running JSPs mainly, you shouldn't have any problems.

Be sure to stop Tomcat BEFORE starting it with server.xml updated.

Peace...
 
Old 05-06-2006, 03:24 AM   #98
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Hello,

yes i know how to do it. However, since I will be using tomcat and not apache where would I set mydomain name and map it to ip address just like in hosts file?

thanks.
 
Old 05-06-2006, 09:26 AM   #99
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
yes i know how to do it. However, since I will be using tomcat and not apache where would I set mydomain name and map it to ip address just like in hosts file?
In your hosts file. When configuring Apache, you define what the ServerName is, but you can leave that directive out and Apache will still serve requests.

You will need to have your domain registered somewhere (either via DNS or hosts file) and when browsers contact your machine on port 80, Tomcat should respond in some fashion.

Peace...
 
Old 05-06-2006, 03:18 PM   #100
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
ok, thanks but hosts file is part of apache so if i stop apache hosts file won't work, right?
thanks
 
Old 05-06-2006, 05:46 PM   #101
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Quote:
Originally Posted by thisObject
ok, thanks but hosts file is part of apache so if i stop apache hosts file won't work, right?
thanks
Nope, the hosts file has nothing to do with Apache. The hosts file is part of the networking support of your OS. The hosts file will be searched before doing an actual DNS lookup, if /etc/nsswitch.conf is configured that way, which is the case most of the time.

As long as your hosts file is setup as you want, it should work with Apache, Tomcast, your browsers, ping, FTP and any other Internet oriented application you run.

Peace...
 
Old 05-07-2006, 11:08 PM   #102
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Hello again,

I shutdwon http.conf and start tomcat separately and now I cannot access my site like this at all http://www.myDomain.net

I was able to configure to access my site this way: http://www.myDomain.net so I do not have to do this: http://www.myDomain.net. At this point my servlets do not run at all. I get COULD NOT CONNECT error message when I try to invoke an action that triggers a servlet.

Do you think it might happen because of the whole configuration is wrong?
I cann servlet this way: http://www.myDomain.net:8080/WEB/LetThemKnow and nothing happens.

Thanks!

 
Old 05-07-2006, 11:59 PM   #103
tomdkat
Member
 
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595

Rep: Reputation: 30
Did you configure Tomcat to listen on port 80?

Peace...
 
Old 05-08-2006, 12:15 AM   #104
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
I do not know
I am going nuts here

OK, I did port forwarding and forwarded port 80 onto 8080, started Tomcat without apache and it did not help.
Later on I made it possible to access my site directly www.Mydomain.net. JSP working fine with jstl tags in them but when I call a servlet i get an error message. have no clue why.

thanks!
 
Old 05-10-2006, 12:38 AM   #105
thisObject
Member
 
Registered: Apr 2006
Posts: 170

Original Poster
Rep: Reputation: 30
Hello tomdkat,

I am back with my problems
Well, actually I am running Tomcat standalone now and everything is working perfectly fine.
I'll leave it as the way it is for now.

Thanks a lot for your help and following all the way through!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Running jsps in user home directory doesn't work (Apache Tomcat and mod_userdir) jimieee Linux - Networking 0 03-23-2005 10:12 AM
how to get apache and tomcat work together chinaundead Programming 7 12-06-2004 10:33 PM
Tomcat 5.5.1 and Apache 2 kpmaddenuk Linux - Software 2 10-30-2004 05:55 AM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM
Apache,Tomcat prowzen Linux - Software 0 05-09-2001 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:10 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