tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Mckean <WMck...@us-south.net>
Subject RE: 80 or 8080?
Date Mon, 19 Jun 2000 15:39:36 GMT
In all honesty, I changed my port value in server.xml to 8081, because I am
using the open source Java Application Server, JBoss, with my Apache+Tomcat
setup, and it wants to use 8080.  My other port, for the Apjp12Connection is
8007.

Perhaps it would be good to start from the beginning.  If you start Apache,
and you see Apache/1.3.12 tomcat/1.0 running..., then Apache and Tomcat are
communicating.  After I started Tomcat for the first time, it created my
tomcat-apache.conf file, and I did not have to ANYTHING other than include
this file in my httpd.conf file in the Apache conf directory.  I am running
Apache+Tomcat+JBoss under Windows 2000.

The key is tomcat-apache.conf file.  Forgive me if I am being redundant.
You have to include this file in your http.conf file, or copy it all in by
hand ( not recommended ).  At risk of shooting out a huge email, here is my
configuration file for Tomcat, which I include in my httpd.conf file.  I
never changed a single line in here, except for the extra directory I added
at the bottom.

--------------------

LoadModule jserv_module modules/ApacheModuleJServ.dll
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultPort 8007

AddType test/jsp .jsp
AddHandler jserv-servlet .jsp
Alias /examples "D:\Program Files\Apache
Group\jakarta-tomcat\webapps\examples"
<Directory "D:\Program Files\Apache Group\jakarta-tomcat\webapps\examples">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /examples/servlet /examples
<Location /examples/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

Alias /test "D:\Program Files\Apache Group\jakarta-tomcat\webapps\test"
<Directory "D:\Program Files\Apache Group\jakarta-tomcat\webapps\test">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /test/servlet /test
<Location /test/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

Alias /ncp "D:\Program Files\Apache Group\jakarta-tomcat\webapps\ncp"
<Directory "D:\Program Files\Apache Group\jakarta-tomcat\webapps\ncp">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /ncp/servlet /ncp
<Location /ncp/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

ApJServMount /servlet /ROOT
    
--------------------

Hope this helps...

Wes

-----Original Message-----
From: Frank Peng [mailto:frank_peng_01@yahoo.com]
Sent: Monday, June 19, 2000 11:19 AM
To: tomcat-user@jakarta.apache.org
Subject: 80 or 8080?


Thanks Wes!

I copied the file from the uguide.html in the tomcat
doc directy and saved a tomcat1.conf. Then in my
http.conf file I have a line to include this file.

If I configure the server.xml to port 80, there is no
way to run tomcat anything.
If I configure the server.xml to 8080, I goes to
Apache's htdocs, there is not way to access tomcat
except I add :8080 after the site name.

What is the behavior of your setting now. What is the
port number in your server.xml file. Do you have to
type http://localhost:<tomcat's port number> to access
tomcat while you access Apache with http://localhost?

I compiled the ApacheModuleJserv.dll but I failed to
compile apache and Tomcat, I use binary instead. Does
this matter?


Thanks.



--- Wes Mckean <WMckean@us-south.net> wrote:
> That's because when you go to port 8080, you are
> specifically asking Tomcat
> to service your request, not Apache.  Here is some
> additionally information
> in my tomcat-apache.conf file, which maps those
> directories, so Apache can
> use them.  Bear in mind that I am under NT.
> 
> Alias /examples "D:\Program Files\Apache
> Group\jakarta-tomcat\webapps\examples"
> <Directory "D:\Program Files\Apache
> Group\jakarta-tomcat\webapps\examples">
>     Options Indexes FollowSymLinks
> </Directory>
> ApJServMount /examples/servlet /examples
> <Location /examples/WEB-INF/ >
>     AllowOverride None
>     deny from all
> </Location>
> 
> Alias /test "D:\Program Files\Apache
> Group\jakarta-tomcat\webapps\test"
> <Directory "D:\Program Files\Apache
> Group\jakarta-tomcat\webapps\test">
>     Options Indexes FollowSymLinks
> </Directory>
> ApJServMount /test/servlet /test
> <Location /test/WEB-INF/ >
>     AllowOverride None
>     deny from all
> </Location>
> 
> Wes
> 
> -----Original Message-----
> From: Frank Peng [mailto:frank_peng_01@yahoo.com]
> Sent: Monday, June 19, 2000 10:54 AM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: How to keep Apache's htdocs while let
> Tomcat run?
> 
> 
> Thanks Bill!
> 
> honestly I don't know what I am doing.
> 
> Following your instruction, I changed back the port
> number from 80 to 8080 in the server.xml file. Then
> I
> run tomcat, seems running, then I run Apache, says
> Apache 1.3.12 tomcat/1.0 running. Sounds good.
> 
> When I type http://localhost in the browser, it goes
> to Apache's htdocs and the cgi-bin files all
> working.
> But when I type http://localhost/example/servlets/,
> it
> can not find the file. So I type
> http://localhost:8080/example/servlets/, it works.
> 
> It seems Tomcat and Apache are working with
> different
> port numbers. They are not communicating.
> 
> This is too bad.
> 
> Also I tried to run Perl cgi program from Tomcat.
> But
> when I use a browser to access that cgi file, it try
> to download the file instead of run it. So there is
> no
> way from Tomcat to run a Perl CGI program, eh? My
> idea
> is that if Tomcat can run Perl CGI program, why
> bother
> with Apache?
> 
> No short cut, eh?
> 
> 
> 
> 
> --- Bill Pfeiffer <pfeiffer@gte.net> wrote:
> > Frank,
> > 
> > I think the apache to tomcat architecture works
> like
> > this:
> > 
> > 1. Request comes into apache with a URL.
> > 2. URL matches the mapping as specced by the Alias
> > directive in the
> > tomcat_apache.conf
> > 3. Apache will redirect the request through to
> > tomcat via the port and
> > protocal (ApJServDefaultPort=8007,
> > ApJServDefaultProtocol=ajpv12) also
> > specced in the tomcat_apache.conf
> > 4. Tomcat services the request normally.
> > 
> > Given that the commuication takes place on port
> > 8007, there should be no
> > need to have tomcat listening on port 80.  Apache
> > does the redirecting from
> > port 80 (if the URL is a tomcat URL) to tomcat. 
> You
> > can leave tomcat
> > listening on 8080 (and 8007 which does the real
> > work).
> > 
> > I believe your changing tomcat (in the server.xml)
> > to listen on port 80
> > instead on 8080 has allowed tomcat to recieve all
> > http port 80 traffic in
> > place of  apache.  You obviously don't want this.
> > 
> > These are my best guesses as I have only just
> > started working with this
> > stuff 2 days ago.
> > 
> > Hope it helps,
> > 
> > Bill Pfeiffer
> > Arbitration Forums, Inc
> > wpfeiffe@arbfile.org
> > pfeiffer@gte.net
> > 
> > -----Original Message-----
> > From: Frank Peng [mailto:frank_peng_01@yahoo.com]
> > Sent: Monday, June 19, 2000 9:43 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: How to keep Apache's htdocs while let
> > Tomcat run?
> > 
> > 
> > Thanks Bill!
> > 
> > By including the tomcat-apache.conf file in the
> > httpd.conf file instead of copy and paste this
> file
> > at
> > the end of httpd.conf then change the server.xml
> > httpconnectionhandle port number from 8080 to 80,
> > now
> > I can see Apache 1.3.12(win32) Tomcat/1.0 running.
> > 
> > Now the problem is every thing in the Apache
> htdocs
> > and cgi-bin directory disappeared. How can I find
> > those content back. It seems now Tomcat take every
> > thing and ignoring Apache.
> > Should I copy all of the files from Apache htdocs
> > and
> > cgi-bin to /jakarta-tomcat/webapps/root/ ? Or
> there
> > is
> > a trick to let Tomcat leave Apache alone and
> Tomcat
> > only do his own business ?
> > 
> > 
> > Please give a hand.
> > 
> > Thanks!
> > 
> > Frank Peng.
> > 
> > 
> > 
> > 
> > --- Bill Pfeiffer <pfeiffer@gte.net> wrote:
> > > To test if Tomcat is being served up through
> > Apache,
> > > DON'T use the 8080
> > > port.  Use apache's normal port (usually 80) and
> > the
> > > appropriate URL.  To
> > > just try the tomcat examples use
> > > http://localhost/examples/servlets/.
> > >
> > > You should also see something to the effect of
> > > "Apache/1.3.12 (Win32)
> > > tomcat/1.0 running..." on the apache command
> line
> > if
> > > tomcat is being served
> > > up via apache.
> > >
> > > Hope this helps,
> > >
> > > Bill Pfeiffer
> > > Arbitration Forums, Inc
> > > wpfeiffe@arbfile.org
> > > pfeiffer@gte.net
> > >
> > > -----Original Message-----
> > > From: Frank Peng
> [mailto:frank_peng_01@yahoo.com]
> > > Sent: Monday, June 19, 2000 3:56 AM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: How do I know Apache calling Tomcat or
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Send instant messages with Yahoo! Messenger.
http://im.yahoo.com/

--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message