You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jb...@rogers.com on 2010/06/16 20:07:34 UTC

adding hosts to server.xml

i have configured iis7 to work in front of tomcat6 with the isapi 
redirector. Now, i can see a servlet("my-servlet") i've made under 
http://localhost/my-servlet. How do i get it to work for my own 
domain("www.mywebsite.com"), ie. www.mywebsite.com/my-servlet ? I've 
read the docs and tried adding a new host parameter for tomcat's 
server.xml file, and have tinkered around with workers.properties and 
uriworkermap.properties files with no luck.

I'm not sure if this is the right way to go about doing this?

Simply, i have http://localhost/<my-servlet> working, how do i get
 www.mywebsite.com/<my-servlet> to work as well?

thanks

J

Re: adding hosts to server.xml

Posted by Pid <pi...@pidster.com>.
On 16/06/2010 20:46, André Warnier wrote:
> jbuy@rogers.com wrote:
>> i have configured iis7 to work in front of tomcat6 with the isapi
>> redirector. Now, i can see a servlet("my-servlet") i've made under
>> http://localhost/my-servlet. How do i get it to work for my own
>> domain("www.mywebsite.com"), ie. www.mywebsite.com/my-servlet ? I've
>> read the docs and tried adding a new host parameter for tomcat's
>> server.xml file, and have tinkered around with workers.properties and
>> uriworkermap.properties files with no luck.
>>
>> I'm not sure if this is the right way to go about doing this?
>>
>> Simply, i have http://localhost/<my-servlet> working, how do i get
>>  www.mywebsite.com/<my-servlet> to work as well?
>>
> In all likelihood, your problem is due to Name Resolution, not to Tomcat.
> Go back to the standard config before you started tinkering (the one
> where it was working with http://localhost/my-servlet).
> On the workstation where you call up the browser, find the "hosts" file
> (normally in C:\windows\system32\drivers\etc), edit it with notepad and
> add a line :
> w.x.y.z www.mywebsite.com
> where w.x.y.z is the IP address of the IIS server machine.
> (If all of this is on the same machine, then use 127.0.0.1 for this IP
> address)
> 
> Close the browser, re-open it, and try http://www.mywebsite.com/my-servlet

We should also ask: is there a particular reason for using IIS as well
as Tomcat, or can you drop IIS?


p

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



Re: adding hosts to server.xml

Posted by André Warnier <aw...@ice-sa.com>.
Hi.

Just send responses to the list, I get all messages to the list.
If you send it to me also, I get each one twice.
(In other words, just hit "reply", not "reply to all").

Below here, when asked to copy and paste the content of some files, really do it that way.
Do not send the files as attachments, this list often strips them.
Really paste their contents in your next message.

Also, remove all comments if possible, to make it shorter.


If the easy and quick explanations don't work, this will have to be systematic.
Please respond to all questions, it will be quicker and easier for both of us.

1) is this all on one same workstation, or do you have a separate server and a workstation 
where you run the browser ?  If they are separate, provide the IP address of each.

2) if you open a command window (a "DOS window") on the workstation, and type :

ping www.mywebsite.com

what do you see ? (copy and paste it here)

3) make a copy of your Tomcat server.xml file.
In the copy, remove all the comments (any section between <!-- and the next --> ),
remove any passwords and real hostnames, copy the remainder and paste it here.

4) also copy and paste the contents of the files
workers.properties and uriworkermap.properties here.

5) tell us exactly which version of Tomcat you have installed, and from which exact link 
you downloaded it.  A Tomcat version consists of 3 numbers, like 6.0.20.
The same for the isapi_redirector.

6) are you running Tomcat as a Windows Service, or from a command window entering 
"startup.bat" ?

7) you said you followed the documentation for the setup of the isapi redirector.  What 
was the URL of that page ?


Sorry for all this, just want to make sure we are talking about the same thing and get the 
basics right.




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


Re: adding hosts to server.xml

Posted by jb...@rogers.com.
hi andre
thanks for the reply
i found the hosts file where you 
said it would be and made the according changes
im still getting a 
404 error, but now it is an IIS error page.
I tried removing the 
hosts parameter for the website in server.xml, and also putting it back,
 but i get the same error page.
Do you have any other suggestions on 
this?
i'm new to tomcat configuration files
thanks

--- On Wed, 6/16/10, André Warnier <aw...@ice-sa.com> wrote:

From: André Warnier <aw...@ice-sa.com>
Subject: Re: adding hosts to server.xml
To: "Tomcat Users List" <us...@tomcat.apache.org>
Date: Wednesday, June 16, 2010, 3:46 PM

jbuy@rogers.com wrote:
> i have configured iis7 to work in front of tomcat6 with the isapi redirector. Now, i can see a servlet("my-servlet") i've made under http://localhost/my-servlet. How do i get it to work for my own domain("www.mywebsite.com"), ie. www.mywebsite.com/my-servlet ? I've read the docs and tried adding a new host parameter for tomcat's server.xml file, and have tinkered around with workers.properties and uriworkermap.properties files with no luck.
> 
> I'm not sure if this is the right way to go about doing this?
> 
> Simply, i have http://localhost/<my-servlet> working, how do i get
>  www.mywebsite.com/<my-servlet> to work as well?
> 
In all likelihood, your problem is due to Name Resolution, not to Tomcat.
Go back to the standard config before you started tinkering (the one where it was working with http://localhost/my-servlet).
On the workstation where you call up the browser, find the "hosts" file (normally in C:\windows\system32\drivers\etc), edit it with notepad and add a line :
w.x.y.z www.mywebsite.com
where w.x.y.z is the IP address of the IIS server machine.
(If all of this is on the same machine, then use 127.0.0.1 for this IP address)

Close the browser, re-open it, and try http://www.mywebsite.com/my-servlet





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


Re: adding hosts to server.xml

Posted by André Warnier <aw...@ice-sa.com>.
jbuy@rogers.com wrote:
> i have configured iis7 to work in front of tomcat6 with the isapi 
> redirector. Now, i can see a servlet("my-servlet") i've made under 
> http://localhost/my-servlet. How do i get it to work for my own 
> domain("www.mywebsite.com"), ie. www.mywebsite.com/my-servlet ? I've 
> read the docs and tried adding a new host parameter for tomcat's 
> server.xml file, and have tinkered around with workers.properties and 
> uriworkermap.properties files with no luck.
> 
> I'm not sure if this is the right way to go about doing this?
> 
> Simply, i have http://localhost/<my-servlet> working, how do i get
>  www.mywebsite.com/<my-servlet> to work as well?
> 
In all likelihood, your problem is due to Name Resolution, not to Tomcat.
Go back to the standard config before you started tinkering (the one where it was working 
with http://localhost/my-servlet).
On the workstation where you call up the browser, find the "hosts" file (normally in 
C:\windows\system32\drivers\etc), edit it with notepad and add a line :
w.x.y.z www.mywebsite.com
where w.x.y.z is the IP address of the IIS server machine.
(If all of this is on the same machine, then use 127.0.0.1 for this IP address)

Close the browser, re-open it, and try http://www.mywebsite.com/my-servlet





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


Re: adding hosts to server.xml

Posted by jb...@rogers.com.
i get a 404 file not found error

--- On Wed, 6/16/10, Pid <pi...@pidster.com> wrote:

From: Pid <pi...@pidster.com>
Subject: Re: adding hosts to server.xml
To: "Tomcat Users List" <us...@tomcat.apache.org>
Date: Wednesday, June 16, 2010, 2:11 PM

On 16/06/2010 19:07, jbuy@rogers.com wrote:
> i have configured iis7 to work in front of tomcat6 with the isapi 
> redirector. Now, i can see a servlet("my-servlet") i've made under 
> http://localhost/my-servlet. How do i get it to work for my own 
> domain("www.mywebsite.com"), ie. www.mywebsite.com/my-servlet ? I've 
> read the docs and tried adding a new host parameter for tomcat's 
> server.xml file, and have tinkered around with workers.properties and 
> uriworkermap.properties files with no luck.
> 
> I'm not sure if this is the right way to go about doing this?
> 
> Simply, i have http://localhost/<my-servlet> working, how do i get
>  www.mywebsite.com/<my-servlet> to work as well?

What happens when you visit the latter URL?


p



Re: adding hosts to server.xml

Posted by Pid <pi...@pidster.com>.
On 16/06/2010 19:07, jbuy@rogers.com wrote:
> i have configured iis7 to work in front of tomcat6 with the isapi 
> redirector. Now, i can see a servlet("my-servlet") i've made under 
> http://localhost/my-servlet. How do i get it to work for my own 
> domain("www.mywebsite.com"), ie. www.mywebsite.com/my-servlet ? I've 
> read the docs and tried adding a new host parameter for tomcat's 
> server.xml file, and have tinkered around with workers.properties and 
> uriworkermap.properties files with no luck.
> 
> I'm not sure if this is the right way to go about doing this?
> 
> Simply, i have http://localhost/<my-servlet> working, how do i get
>  www.mywebsite.com/<my-servlet> to work as well?

What happens when you visit the latter URL?


p