tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Trouble setting up virtual host
Date Thu, 23 Jul 2009 20:33:43 GMT
Lisa,
I am doing my best to help, but you are not making it easy.
You get one more try, cause I'm a good guy (unlike Chuck).
See below.

And do leave some space between questions and answers, it's just much 
easier to read.

Lisa D Beggs/AC/VCU wrote:
>> another note.....now that I have changed port from 8080 to 80,
> How exactly did you do this ?  I changed the configuration in the 
> server.xml file based on guidance from my vendor.

Unfortunately, I wasn't there, so I do not know what your vendor told 
you to do, nor what you really did.
So, what did you change, where in the server.xml ?
Did you keep a copy of how it was before you changed it ?

> 
>   I cannot
>> see my default URL (http://adm138/InfoViewApp) either on user 
> workstation 
>> (not sure if same or different issue, can see on server with no problem) 
> 
> 
> Q6.5 :
> Can you explain what you mean by "can see on server with no problem" ?  If 
> I type in my url in the browser on my server (http://adm138/InfoViewApp) 
> with the 8080, the page comes up, I can not do this on a user 
> workstation...if I change the port back to 8080 in the server.xml 
> file....I can bring it up again on the user work station but I must add 
> adm138:8080 in the url name.

Could you re-read the question, and your answer, and see if to you it 
makes sense ? To me, it doesn't.

> 
> Do you mean that if you open a browser directly on the server console, 
> then you can see the Tomcat default page when you enter :
> either
> http://www.fmdreports.vcu.edu
> and/or
> http://adm138
> ?  NO, still can not see them.  However, I see the default Tomcat home 
> page if I enter these URLS on the server.
> 

Same thing.  Worse, in fact.

> But if you do this on any other workstation, you get a "cannot display 
> this page" answer ?  Right :)
> 
> 
> A whole bunch of new questions :
> 
> Q7:
> In which directory is Tomcat installed on this server ?  C:\Program 
> Files\Business Objects\Tomcat55
> 
OK. (but leave space)

> Q8:
> Supposing for now that this directory is "c:\tomcat", then under this 
> directory, are there the following subdirectories :
> - C:\Program Files\Business Objects\Tomcat55\conf
> - C:\Program Files\Business Objects\Tomcat55\conf
> - C:\Program Files\Business Objects\Tomcat55\webapps\ROOT
> - C:\Program Files\Business Objects\Tomcat55\webapps\InfoViewApp\
> 
The second line doesn't match the question, but OK, I get the idea.

> 
> Q9:
> Is there any other (than InfoViewApp) Tomcat-based application running 
> on that server ?  NO

Good, that makes it easier.  See the additional info at end.


> 
> Will there be other applications there in the near future ?  No we don't 
> intend there to be

Good also.

> 
> Q10:
> Suppose that we set this server up so that /both/ the URLs :
> http://www.fmdreports.vcu.edu
> and
> http://adm138
> return directly the login page of your application, would this be a 
> problem ?  That should not be a problem, should that cause any future 
> issues?

Not right now.  And by the time it becomes an issue, there will be 
someone else on the list to help you with it, I'm sure.


> 
> Or do you need that "http://adm138" still returns the default Tomcat 
> homepage ?

I thus guess not.


> 
> Q11:
> In the "\conf" subdirectory of your Tomcat installation, there is a file 
> named "server.xml".  In that file, there is a section resembling the 
> following (the ports may be different) :
> 
>      <!-- Define a non-SSL HTTP/1.1 Connector on port 8180 -->
>      <Connector port="8180" maxHttpHeaderSize="8192"
>         maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>         enableLookups="false" redirectPort="8443" acceptCount="100"
>         connectionTimeout="20000" disableUploadTimeout="true" />
> 
> 
> Is this what you are looking for?  I don't have the one above......
> 
>    <Connector URIEncoding="UTF-8" acceptCount="100" 
> connectionTimeout="20000" disableUploadTimeout="true" 
> enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" 
> maxThreads="150" minSpareThreads="25" port="80" redirectPort="8443"/>
> 

I said "resembling", I did not say "the same".  The only significant 
difference is the order of the attributes, which technically does not 
matter here.
But it's ok.  At least now, I know that there /should/ be a Tomcat 
listening on port 80.  But see below, we're not out of the woods yet.

By the way, this very portion of your server.xml above, is probably 
where your vendor told you to change the port between 80 and 8080, right ?


> 
> Q12:
> On the server, in a command window, enter the following command :
> netstat -anb -p tcp
> then also paste the response in your answer here.
>

Now this is a real bummer.  Based on what you show below, there is no 
Tomcat on that system listening on any port.
There is just one tomcat5.exe, which seems to be having a conversation 
with a CMS.exe running on your server also.

What I'm saying is that you missed a whole bunch of lines that were the 
output of that command, and which probably scrolled off the top of the 
screen before you had a chance to copy them.
It's a pity, because they were just the interesting ones.
;-)

So, do it again, but this time use this :

netstat -anb -p tcp | more

and copy and paste each screen, typing a CR only when you are done with 
one screen, to see the next one and cut-and-paste it.

The lines of particular interest, are the ones around where 
[tomcat5.exe] appears.
If you send just those, it's OK too.  But don't miss one.


... whole bunch of lines missing here ...
> 
> 
>   [rcgui.exe]
> 
>   TCP    127.0.0.1:9535         127.0.0.1:1682         ESTABLISHED     196
>   [issuser.exe]
> 
>   TCP    128.172.12.129:1405    128.172.30.98:389      ESTABLISHED 2804
>   [CMS.exe]
> 
>   TCP    128.172.12.129:1406    128.172.30.98:389      ESTABLISHED 2804
>   [CMS.exe]
> 
>   TCP    128.172.12.129:1407    128.172.30.98:389      ESTABLISHED 2804
>   [CMS.exe]
> 
etc...


Now some advance information, which will unfortunately only become 
really useful when we've sorted out this port 80/8080 and these other 
workstations issues.

Based on your answer to Q8, complemented by your answers to Q9 and Q10 :

There are two separate issues, which can be dealt with separately :

1) make the application respond to
http://www.fmdreports.vcu.edu
(without any :8080 or /InfoViewApp at the end)

2) make the other workstations able to connect to your server.

Let tackle (1) first :

- stop Tomcat

- rename the directory
C:\Program Files\Business Objects\Tomcat55\webapps\ROOT
to become
C:\Program Files\Business Objects\Tomcat55\webapps\old-default

- rename the directory
C:\Program Files\Business Objects\Tomcat55\webapps\InfoViewApp
to become
C:\Program Files\Business Objects\Tomcat55\webapps\ROOT
(in other words, just change "InfoViewApp" to "ROOT")

- restart Tomcat

That should be it.  It means that now, instead of the default Tomcat 
page, your application (which was "InfoViewApp") has become Tomcat's 
/default application/, the one that users will see when they enter the URL
http://www.fmdreports.vcu.edu

If I understand well what you have tried to communicate above, this 
should work right away, but only from the browser running on the server.
And, for the time being, you may need to add a ":8080" at the end, it's 
a bit hard to tell right now.

Once that bit is working, we can address issue # 2 later.


Ironically, that's what Hassan told you many messages ago.
But maybe he was a bit short.  I have more time.


Additional information, just if you want to learn something from this :

In a URL like "http://www.fmdreports.vcu.edu:8080/InfoViewApp", there 
are separate parts.  The whole is known as the URL, but each part also 
has a name and a separate function :

*http://* is the "protocol".  That is like the "language" that the 
browser speaks to the server. (For example, "https://" would mean a 
different protocol, or language).  The browser and the server must speak 
the same protocol, otherwise they cannot communicate.

*www.fmdreports.vcu.edu*  is the "hostname".  That is just a name for 
humans, that can be translated by the DNS system into an IP address. 
This IP address is what the browser uses to send his request to the 
correct server.
Different hostnames can correspond to the same IP address.  In that 
case, they are called "aliases" of one another.  In your case thus, 
whether the browser uses "www.fmdreports.vcu.edu" or "adm138" as the 
hostname does not matter, because ultimately these requests go to the 
same IP address, and thus to the same server.

*:8080*  is an (optional) port number.  This is really another part of 
the IP address.  To use a telephone analogy, let's say that the IP 
address is the general telephone number of a company, and the port is 
the individual extension within that company's telephone system.
In TCP/IP terms, the IP address is the address of the server, and the 
port is the internal extension of a "service" within this server (like 
Tomcat).
Each "protocol" is usually associated with a "default port".  For the 
"http://" protocol, this default port is 80.  That is why it is optional 
, if the webserver is listening on the default port 80, to specify this 
port in the URL.  But if the server is listening on any other, 
non-default port (like 8080), then you need to specify it in the URL.

And finally, what comes after the
protocol://hostname:port/
is "the rest", known as a combination of a path and possibly a query.
That's your "/InfoViewApp".  It indicates which application the browser 
wants to talk to, within the Tomcat service.

An empty path, indicated as just "/", is also a valid path.  It 
indicates that the browser wants the "default application" of that service.

In the case of Tomcat, the various applications are usually organised 
under the Tomcat/webapps/ sub-directory.
Currently thus, you application is located in the directory
Tomcat/webapps/InfoViewApp.
And a browser, to request it, must use a URL like
protocol://hostname(:port)/InfoViewApp

In order to avoid confusion, the Tomcat default application is located 
under Tomcat/webapps/ROOT/. (The capitals in ROOT do matter).
That is the application that browsers get when they request just
protocol://hostname(:port)/

That is why, earlier, by renaming the existing ROOT application (which 
displays the Tomcat default page), and renaming yours to ROOT, we made 
your application become the default, so that browsers can now access it  via
  protocol://hostname(:port)/

Note that the old default Tomcat page is still there.  But to get it, 
now in the browser you have to use the URL
http://www.fmdreports.vcu.edu(:8080)/old-default
(do you understand why ?)


One inconvenient of this scheme, is that you cannot have TWO default 
applications.  You need to choose one of them to be the default (and go 
under Tomcat/webapps/ROOT/).
So, if later you decide to add another different application to the same 
server, then that one cannot be the default, because yours already is.
This other application (suppose it is called "AnotherApp") will then be 
placed in the subdirectory Tomcat/webapps/AnotherApp, and will have to 
be accessed by browsers as
http://www.fmdreports.vcu.edu/AnotherApp

Is it now clearer ?

It may all looks rather mysterious at first, but it is really quite 
simple and logical.  A bit of dedication, and you'll end up as the 
Tomcat guru, you'll see.
;-)



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message