Caldarale, Charles R wrote:
From: Johnson, Rob E [mailto:rob.john...@mms.gov]
...

Hi guys, can I jump in here ?
I believe that you are being a bit tough on Rob here.
Obviously, he is not a Tomcat expert, and more used to IIS and the MS way of things, than to Apache httpd and Tomcat. And in IIS, these things are administered through a graphical interface which talks of "sites" and so, so I think he is getting a bit confused. I don't know if I can redeem all of that in 5 minutes, but I'm willing to try.

Rob,
you are being blasted here because this is a forum for Apache Tomcat, which is an Open Source product, and as such it, and the people here, are striving to follow the official Internet RFCs and the vocabulary used in those documents. Microsoft on the other hand propose their own proprietary products, with their own interfaces and vocabulary. That is their fundamental right, but it can lead to some confusion when one is trying to marry the two worlds. For example, what MS and IIS call a "site", is usually in Apache httpd and Tomcat designated by "virtual Host".

In a purely MS-world, using the MS proprietary vocabulary is fine, because within the confines of that world that vocabulary is readily understood. In the world of the Internet and Open Source software, where products come from many sources and have to interact with one another, using the official Internet RFC vocabulary is necessary, because it is the only way by which these products and the people using them can understand eachother and communicate (as you just discovered).

Usually also, MS products are designed to be configured primarily through a graphical interface, while many open-source products are mainly configured by means of text files (for Tomcat, in XML format), and a graphical interface is often an afterthought. (And in the Open Source world, particularly with older guys like Chuck and me, graphical configuration interfaces are considered like things for kiddies; the real pros use text files, and a vi editor).

Tomcat is primarily a java servlet server (special web applications written in java). But it can act as a generic webserver, and serve normal static pages too. The standard port on which a webserver listens for requests from browsers, is port 80. But it can listen for browser requests on any port, as long as it is configured to do so, and as long as that same port is not in use by something else on the same host.

Therefore, your initial question is a bit confusing, because you mention both a URL of "http://webtop"; (thus implying a standard HTTP port 80, thus the equivalent URL to "http://webtop:80/";), and "http://localhost:8080/webtop"; (thus using a non-standard port 8080), and you call them both "sites". Plus, in these URLs, only the "webtop" or "localhost" parts really have something to do with DNS, and DNS itself (the Domain Name System) has nothing to do with IIS (a webserver), and it seemed in your first post that you were also confusing these things. Plus, you mention in your post that you would like the users to enter in their browser the URL "http://webtop"; and that they be automatically redirected to the "site" "http://localhost:8080/webtop"; which really does not make any sense and is rather impossible.

So, for all of that, you got treated a bit roughly, but without malice, and I am sure that it was merely an attempt by the other posters here, to get you to straighten up your vocabulary, in an Internet RFC sense.

Before we get back to your question, there is another explanation I want to provide, lest we talk again different languages later.

When, in the browser URL bar, a user enters a URL like : http://webtop, the browser really does the following : - it asks the underlying Operating System, to resolve the hostname included in this URL (here "webtop") into an IP address (like 1.2.3.4). - then it establishes a TCP connection with the host at that IP address, at the port indicated (here port 80, implicitly for HTTP) - then it sends to that host a HTTP request consisting, as a minimum, of 2 text lines :
1) GET / HTTP/1.1
2) Host: webtop

Similarly, when the user enters "http://localhost:8080/webtop";, the browser : - asks the underlying Operating System, to resolve the hostname included in this URL (here "localhost") into an IP address (and this will always come back as 127.0.0.1, because on any machine "localhost" is that address). - then it establishes a TCP connection with the host at that IP address, at the port indicated (here thus, to IP 127.0.0.1 and port 8080, as explicitly mentioned) - then it sends to that host a HTTP request consisting, as a minimum, of 2 text lines, in this case :
1) GET /webtop HTTP/1.1
2) Host: localhost

So here you can already see why your initial explanation sounded strange : because in the first case, the IP address returned by the OS (and the DNS system to which it talks) would be whatever public IP address corresponds to the Alias "webtop" (for example, 192.168.20.38); while in the second case, the IP address would always be "127.0.0.1", meaning "this machine on which the browser is running". The two would only ever point to the same machine, if the browser was running on the same host where Tomcat is running (which would be true only on the Tomcat host itself, and not on any user workstation).

So, I imagine that what you really would like is this :

Currently :
- you have a host whose main DNS name is "imsden.mms". This name evaluates to an IP address of, say, 192.168.200.10.
- there exists a DNS alias "webtop", which evaluates to the same IP address.
- when users in their browser enter one of the URLs "http://imsden.mms"; or "http://webtop";, they currently obtain the same "standard Tomcat homepage". (That is, if Tomcat is listening on port 80; if it is listening on port 8080, then they have to add ":8080" in order to get that) - when users in their browser enter one of the URLs "http://imsden.mms/webtop"; or "http://webtop/webtop";, they currently obtain the same application page, coming from the "webtop" Tomcat application (same remark about the port :8080)

What you would like is that :
- when a user enters the URL "http://imsden.mms"; (or "http://imsden.mms:8080";), he continues to get the standard Tomcat homepage - when a user enters the URL "http://webtop"; (or "http://webtop:8080";), he gets immediately the first page of the "webtop" application

Is that correct ?









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

Reply via email to