RE: SSL Certificate Update Not Reflected on the Website

2012-01-09 Thread Conway Liu
Thanks Pid.

The problem was actually due to the network admin had to also update the proxy 
server. Only if he responds quicker to my emails and calls

Regards
Conway


-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Tuesday, 10 January 2012 8:36 a.m.
To: Tomcat Users List
Subject: Re: SSL Certificate Update Not Reflected on the Website

On 09/01/2012 10:44, Conway Liu wrote:
> Hi Pid,
> 
> I tried different browsers, and tried different computers.
> 
> What command line tool are you talking about?

Something like: curl or openssl


p

> Thanks
> Conway
> 
> -Original Message-
> From: Pid * [mailto:p...@pidster.com]
> Sent: Monday, 9 January 2012 11:37 p.m.
> To: Tomcat Users List
> Subject: Re: SSL Certificate Update Not Reflected on the Website
> 
> On 9 Jan 2012, at 10:20, Conway Liu  wrote:
> 
>> Hi,
>>
>> We used to use Thawte for our SSL certificate. Today I installed new 
>> SSL certificate issued by VeriSign and there were no errors. The 
>> primary and secondary intermediate CAs both imported into the 
>> keystore file properly, and then the SSL issued by VeriSign imported 
>> as well. I updated the server.xml to indicate the new keystore file with the 
>> keystore password.
>> Started Tomcat, checked the log files and there were no errors. But 
>> when I browse to the website, it is still saying the SSL has expired 
>> and it's showing the one issued by Thawte.
>>
>> I tried to put an incorrect keystore password in server.xml and 
>> Tomcat did generate errors in the log file, which means Tomcat is 
>> looking at the correct keystore file.
>>
>> We have also tried to reboot the server in case the old SSL was 
>> cached somewhere but that didn't help.
>>
>> Does anyone have any suggestion where might be wrong?
> 
> Which browser are you using? Some cache Certs and don't reflect the change 
> immediately.
> 
> Have you tried with a command line tool?
> 
> 
> p
> 
> 
>>
>>
>>
>> Thank you very much
>>
>> Conway
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-- 

[key:62590808]



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



RE: SSL Certificate Update Not Reflected on the Website

2012-01-09 Thread Conway Liu
Hi Pid,

I tried different browsers, and tried different computers.

What command line tool are you talking about?

Thanks
Conway

-Original Message-
From: Pid * [mailto:p...@pidster.com] 
Sent: Monday, 9 January 2012 11:37 p.m.
To: Tomcat Users List
Subject: Re: SSL Certificate Update Not Reflected on the Website

On 9 Jan 2012, at 10:20, Conway Liu  wrote:

> Hi,
>
> We used to use Thawte for our SSL certificate. Today I installed new 
> SSL certificate issued by VeriSign and there were no errors. The 
> primary and secondary intermediate CAs both imported into the keystore 
> file properly, and then the SSL issued by VeriSign imported as well. I 
> updated the server.xml to indicate the new keystore file with the keystore 
> password.
> Started Tomcat, checked the log files and there were no errors. But 
> when I browse to the website, it is still saying the SSL has expired 
> and it's showing the one issued by Thawte.
>
> I tried to put an incorrect keystore password in server.xml and Tomcat 
> did generate errors in the log file, which means Tomcat is looking at 
> the correct keystore file.
>
> We have also tried to reboot the server in case the old SSL was cached 
> somewhere but that didn't help.
>
> Does anyone have any suggestion where might be wrong?

Which browser are you using? Some cache Certs and don't reflect the change 
immediately.

Have you tried with a command line tool?


p


>
>
>
> Thank you very much
>
> Conway
>

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


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



SSL Certificate Update Not Reflected on the Website

2012-01-09 Thread Conway Liu
Hi,

 

We used to use Thawte for our SSL certificate. Today I installed new SSL
certificate issued by VeriSign and there were no errors. The primary and
secondary intermediate CAs both imported into the keystore file properly,
and then the SSL issued by VeriSign imported as well. I updated the
server.xml to indicate the new keystore file with the keystore password.
Started Tomcat, checked the log files and there were no errors. But when I
browse to the website, it is still saying the SSL has expired and it's
showing the one issued by Thawte.

 

I tried to put an incorrect keystore password in server.xml and Tomcat did
generate errors in the log file, which means Tomcat is looking at the
correct keystore file.

 

We have also tried to reboot the server in case the old SSL was cached
somewhere but that didn't help.

 

Does anyone have any suggestion where might be wrong?

 

Thank you very much

Conway



RE: Creating CSR for Purchasing SSL Certificate from VeriSign

2011-12-23 Thread Conway Liu
Thank you Piotr, I will have a read of the link you provided.
Merry Christmas
Conway

-Original Message-
From: Piotr Pawłowski [mailto:piotr.pawlow...@goyello.com] 
Sent: Saturday, 24 December 2011 10:27 a.m.
To: Tomcat Users List
Subject: RE: Creating CSR for Purchasing SSL Certificate from VeriSign

Hi Conway,

All depends on your server setup. If you have Tomcat 'behind' Apache, NginX
or IIS you should generate csr and install certificate on those software
which is on front of Tomcat. If you have only Tomcat on the server you
should familiarize with Tomcat+SSL guides. As a example you can take
following blog entry:
http://linuxadmin.com.pl/index.php/tomcat-and-ssl-certificates-small-how-to/

CSR is generated per certificate, so if you have another ssl certificate for
sure you will need to create another csr.

Best Regards
--
Piotr Pawlowski
GOYELLO System Administrator

____
From: Conway Liu [c...@xtra.co.nz]
Sent: Friday, December 23, 2011 22:13
To: users@tomcat.apache.org
Subject: Creating CSR for Purchasing SSL Certificate from VeriSign

Hi,



We are running a Tomcat website on Windows 2008 R2. The SSL certificate for
this website has expired. Instead of renewing the SSL certificate from the
current SSL provider, we want to buy new SSL certificate from VeriSign.



We are aware that we need to first generate a Certificate Signing Request.
I've landed on this page:

https://knowledge.verisign.com.au/support/ssl-certificates-support/index?pag
e=content
<https://knowledge.verisign.com.au/support/ssl-certificates-support/index?pa
ge=content&id=AR235> &id=AR235



This page has a list of links for the instructions of different types
server. My question is, should I go for Apache (ApacheSSL mod_ssl ),
Microsoft (Windows 2008 - IIS 7.0), or Tomcat (Tomcat)?



Also, if we later add another Tomcat site (with a different domain name) on
the same Windows 2008 R2 server,  do we have to generate another CSR to
purchase another SSL certificate?





Any suggestion is very much appreciated.



Conway Liu



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


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



Creating CSR for Purchasing SSL Certificate from VeriSign

2011-12-23 Thread Conway Liu
Hi,

 

We are running a Tomcat website on Windows 2008 R2. The SSL certificate for
this website has expired. Instead of renewing the SSL certificate from the
current SSL provider, we want to buy new SSL certificate from VeriSign.

 

We are aware that we need to first generate a Certificate Signing Request.
I've landed on this page:

https://knowledge.verisign.com.au/support/ssl-certificates-support/index?pag
e=content
<https://knowledge.verisign.com.au/support/ssl-certificates-support/index?pa
ge=content&id=AR235> &id=AR235

 

This page has a list of links for the instructions of different types
server. My question is, should I go for Apache (ApacheSSL mod_ssl ),
Microsoft (Windows 2008 - IIS 7.0), or Tomcat (Tomcat)?

 

Also, if we later add another Tomcat site (with a different domain name) on
the same Windows 2008 R2 server,  do we have to generate another CSR to
purchase another SSL certificate?

 

 

Any suggestion is very much appreciated.

 

Conway Liu



Re: Enable Security Manager in Tomcat 5

2011-05-11 Thread Conway Liu
After a days google, trial and error, I finally realised that the person who 
migrated the website from linux to Windows did not change the paths in 
catalina.policy.

I got a fresh copy of catalina.policy from Tomcat 5 installation and re-add my 
bits of security settings and it is working now.

Conway





From: Conway Liu 
To: users@tomcat.apache.org
Sent: Thu, 12 May, 2011 11:37:17 AM
Subject: Enable Security Manager in Tomcat 5

Good day!

For testing purposes I have setup a website to run in Tomcat 5, Tomcat 6, and 
Tomcat 7.

The site runs on Windows Server 2008 R2, and I used the service.bat to install 
the windows service so that I can start and stop the site.

When it came to enable the security manager, I read from the web somewhere that 
suggested to add the following code into service.bat:
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava..security.manager"
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions 
"-Djava.security.policy==c:\mywebapp\conf\catalina.policy"

I did accordingly for all three versions of Tomcat. This worked for my website 
in Tomcat 6 and 7. However, when starting the Tomcat 5 service, the service 
could not start.
Reviewing the stderr log file I see this information:
 
java.security.AccessControlException: access denied 
(java.util...PropertyPermission catalina.home read)
  at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)


  at java.security.AccessController.checkPermission(AccessController.java:546)
  at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
  at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
  at java.lang.System.getProperty(System.java:650)
  at org.apache.catalina.startup.Bootstrap.setCatalinaHome(Bootstrap.java:478)
  at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:210)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410)

I then tried to put the following into catalina.policy but it didn't help.

grant { 
    permission java.util.PropertyPermission "catalina.home", "read";
};

I have tried to google further, but so far haven't found the solution.

If anyone knows what I should do, it will be very much appreciated for pointing 
me to the right direction.

Thanks in advance
Conway

Enable Security Manager in Tomcat 5

2011-05-11 Thread Conway Liu
Good day!

For testing purposes I have setup a website to run in Tomcat 5, Tomcat 6, and 
Tomcat 7.

The site runs on Windows Server 2008 R2, and I used the service.bat to install 
the windows service so that I can start and stop the site.

When it came to enable the security manager, I read from the web somewhere that 
suggested to add the following code into service.bat:
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.security.manager"
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions 
"-Djava.security.policy==c:\mywebapp\conf\catalina.policy"

I did accordingly for all three versions of Tomcat. This worked for my website 
in Tomcat 6 and 7. However, when starting the Tomcat 5 service, the service 
could not start.
Reviewing the stderr log file I see this information:
 
java.security.AccessControlException: access denied 
(java.util..PropertyPermission catalina.home read)
  at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)

  at java.security.AccessController.checkPermission(AccessController.java:546)
  at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
  at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
  at java.lang.System.getProperty(System.java:650)
  at org.apache.catalina.startup.Bootstrap.setCatalinaHome(Bootstrap.java:478)
  at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:210)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:410)

I then tried to put the following into catalina.policy but it didn't help.

grant { 
    permission java.util.PropertyPermission "catalina.home", "read";
};

I have tried to google further, but so far haven't found the solution.

If anyone knows what I should do, it will be very much appreciated for pointing 
me to the right direction.

Thanks in advance
Conway

RE: Connecting to other internet sites from a Tomcat application via a proxy server

2011-02-21 Thread Conway Liu
Thanks Andre, I'll have a look.
Conway

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Monday, 21 February 2011 8:47 p.m.
To: Tomcat Users List
Subject: Re: Connecting to other internet sites from a Tomcat application
via a proxy server

Conway Liu wrote:
> Hi,
> 
> Previously our Tomcat application can create https requests and send the
request 
> to other website, which sends response back to our application with
required 
> data.
> 
> Now our Tomcat appcation has been migrated to a server that is not allowed
to 
> send the requests directly to the internet, but rather needs to send
through a 
> proxy server, kind of like specifying a proxy server in web browsers.
> 
> How do I tell Tomcat that "When you need make a https connection, please
do it 
> via this proxy server"?
> 
You do not have to tell Tomcat anything, as Tomcat has nothing to do with
the matter.
It is your application which needs to be told.
To make its connection to the external server, the application uses java
"network" 
classes. It is those classes you need to look at, and set up properly.

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


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



Connecting to other internet sites from a Tomcat application via a proxy server

2011-02-20 Thread Conway Liu
Hi,

Previously our Tomcat application can create https requests and send the 
request 
to other website, which sends response back to our application with required 
data.

Now our Tomcat appcation has been migrated to a server that is not allowed to 
send the requests directly to the internet, but rather needs to send through a 
proxy server, kind of like specifying a proxy server in web browsers.

How do I tell Tomcat that "When you need make a https connection, please do it 
via this proxy server"?

I have read http://tomcat.apache.org/tomcat-6.0-doc/proxy-howto.html but not 
quite understand it. I think I almost need a tutorial type of instructions to 
get it done correctly, like which file to modify, what text to put into 
it...etc.

Any one able to help this poor soul?

You're very much appreciated
Conway Liu

RE: Tomcat Service configuration for running sites

2011-02-04 Thread Conway Liu
Hi All,

I'm probably causing all the confusion here as I am quite confused about Tomcat 
myself so likely not explained my questions in a clear way. I apologise for 
that.

Anyway, I believe now I have finally found the answer I'm looking for, after 
reading all your suggestions and googling for additional info.

So, thanks guys, you all've been very helpful.

Best regards
Conway

-Original Message-
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
Sent: Saturday, 5 February 2011 11:55 a.m.
To: 'Tomcat Users List'
Subject: RE: Tomcat Service configuration for running sites

Chris -
I was working on the OP's original assumption of just getting his first webapp 
up in Tomcat.
I believe someone else had already suggested he look at the RUNNING.txt file 
for doing multiple instances.
But the OP wasn't originally asking about multiple instances of Tomcat, but 
running multiple webapps.
It appears to me he's unclear on the concept of the webapp, thus my suggestion 
to re-read all the documentation.
Perhaps you should re-read the OP's original post.
Jeff

> -Original Message-
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Friday, February 04, 2011 4:39 PM
> To: Tomcat Users List
> Subject: Re: Tomcat Service configuration for running sites
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Jeffrey,
> 
> On 2/4/2011 10:06 AM, Jeffrey Janner wrote:
> > You don't need to duplicate the entire Tomcat structure for your
> > webapp.  Get rid of everything else in C:\WebApp1 except the ROOT and
> > sslcerts directory.  Then configure everything else in the C:\Tomcat
> > directory structure, particularly the server.xml file.  Change the
> > ROOT.xml file to point to C:\WebApp1\ROOT and you should be fine.
> 
> If he's using CATALINA_BASE, he will need the C:\WebApp1\conf directory
> to exist. It makes no sense whatsoever to configure multiple Tomcat
> instances with a single server.xml in CATALINA_HOME/conf.
> 
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk1MgAAACgkQ9CaO5/Lv0PCwagCfVpupXmkQEPSCjlUXezThMEMx
> b58AoL/3sYApDrtm9KEOxGOx/Nh2/dzD
> =tdyL
> -END PGP SIGNATURE-
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


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



RE: Tomcat Service configuration for running sites

2011-02-04 Thread Conway Liu
Hi Jeff,

You're right. It is not officially documented. I wonder why.
I read so many official documents, some of them I read a few times,
still so confusing for me (as I'm just starting out to learn Tomcat).

Regards
Conway

-Original Message-
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
Sent: Saturday, 5 February 2011 3:57 a.m.
To: 'Tomcat Users List'
Subject: RE: Tomcat Service configuration for running sites

Mark -
I run a number my sites under this configuration.  Works great.
Didn't realize it was officially documented though.
Jeff

> -Original Message-
> From: Mark Eggers [mailto:its_toas...@yahoo.com]
> Sent: Thursday, February 03, 2011 3:41 PM
> To: Tomcat Users List
> Subject: Re: Tomcat Service configuration for running sites
> 
> This will be long - read at your own risk.
> 
> - Original Message Begin 
> 
> 
> Hi,
> 
> Thanks to all who answered my previous post regarding running Tomcat
> with IIS7.
> 
> I am still quite confused about the whole thing, so I think I should
> try to
> forget about IIS for the time being, and concentrate first on how to
> get Tomcat
> service to serve a java website sitting physically outside of Tomcat's
> installed
> 
> 
> 
> folder.
> 
> BTW, platform is Windows 2008 R2 64bit.
> Tomcat installed is 5.5.32. (In my previous question I installed 6.0.30
> but I
> now realised when the website was running on Linux, my manager was
> using 5.5.23
> and now I can only find 5.5.32 to download. I hope it makes no
> difference).
> 
> 
> For example, Tomcat service is installed on: (... means some more sub
> folders or
> 
> 
> 
> files within):
> C:\Tomcat\
> 
> And the subfolders under this folder are:
> C:\tomcat\bin\...   (contains tomcat5.exe, tomcat5w.exe, and 3 .jar
> files)
> C:\tomcat\common\...
> C:\tomcat\conf\...   (contains catalina.policy, catalina.properties,
> context.xml, logging.properties, server.xml, server-minimal.xml,
> tomcat-users.xml, web.xml)
> C:\Tomcat\conf\Catalina\
> C:\Tomcat\conf\Catalina\localhost
> C:\tomcat\logs
> C:\tomcat\server
> C:\Tomcat\server\classes\
> C:\Tomcat\server\lib\...   (many .jar files in there, e.g.
> catalina.jar)
> C:\Tomcat\server\webapps\...
> C:\tomcat\shared\...
> C:\tomcat\temp
> C:\tomcat\webapps\ROOT\...
> C:\tomcat\work
> 
> My Java web application is placed in:
> C:\WebApp1\
> 
> With subfolders:
> C:\WebApp1\bin\...   (contains tomcat5.exe and tomcat5w.exe and many
> .sh and
> .bat files as we previously start this site using the startup.bat
> before I
> installed the Tomcat service)
> C:\WebApp1\common\...
> C:\WebApp1\conf\...   (contains catalina.policy, catalina.properties,
> context.xml, logging.properties, server.xml, server-minimal.xml,
> tomcat-users.xml, web.xml specifically used by this website)
> C:\WebApp1\conf\Catalina\
> C:\WebApp1\logs\
> C:\WebApp1\server\
> C:\WebApp1\server\lib\...   (many .jar files in there, e.g.
> catalina.jar)
> C:\WebApp1\shared\...
> C:\WebApp1\sslcerts\...   (SSL certificates in here)
> C:\WebApp1\webapps\ROOT\...   (This is the root of the website. E.g.
> default.jsp
> 
> 
> 
> sits in here)
> C:\WebApp1\webapps\ROOT\WEB-INF\classes\...   (The java classes we
> created to be
> 
> 
> 
> used for the website to interact with back-end database)
> C:\WebApp1\webapps\ROOT\WEB-INF\lib\...   (some 3rd party .jar files
> specifically used by this website)
> C:\WebApp1\webapps\ROOT\WEB-INF\web.xml   (contains the listener
> definition,
> points to the listener class, so that when this site starts the
> listener class
> can perform some initialisation tasks)
> C:\WebApp1\work
> 
> 
> Question:
> 1. How should I configure Tomcat service so that it serves the WebApp1
> website?
> Which file in which folder to modify?
> 2. When Tomcat starts WebApp1 website, which set of configuration files
> is it
> using? (Those in C:\tomcat\conf\ or those in C:\WebApp1\conf\?)
> 3. If I am to add another website to the same server, say C:\WebApp2,
> with exact
> 
> 
> 
> folder structure as WebApp1, how should I configure Tomcat service so
> that it
> serves both WebApp1 and WebApp2?
> 4. The two sites will use different IP addresses. For example WebApp1
> is
> 43.88.12.123, and WebApp2 is 43.88.12.133. How do I tell Tomcat which
> IP belongs
> 
> 
> 
> to which website?
> 
> 
> Again, your input is very much appreciated.
> 
> Best regards
> Conway
> 
> - Original Message End 
> 
> Note, I have not tried this, since I normally run multiple Tomcats
> using CATALINA_HOME and CATALINA_BASE. I'm basing this off the
> documentation found at:
> 
> http://tomcat.apache.org/tomcat-5.5-doc/index.html
> 
> AGAIN - CAVEAT - I have not tested this. I am not sure that there
> aren't a lot of typos (as well as other mistakes). Read the above
> documentation
> first, and then see if what I've written below makes sense.
> 
> Here's the overview:
> 
> 1. Create multiple  under the 
>element.
> 
> 2. Create the desired connectors under each 
> 
> 3. The connecto

RE: Tomcat Service configuration for running sites

2011-02-04 Thread Conway Liu
Hi,

Again, thanks to all who replied my post. Your input helped me learn a lot
more about Tomcat.

While reading your answers, I have continued to google about this topic and
today I came across a site that gave me a hint.

To run Tomcat as a windows service, I didn't need to have a separate
installation of Tomcat actually. I.e. I didn't need to have the C:\Tomcat
installation.

Within the C:\WebApp1\bin\ folder, there is a service.bat. To run WebApp1 as
a Windows service, I just need to go into C:\WebApp1\bin and type:

Service.bat install WebApp1

This will then install a windows service named "Apache Tomcat WwebApp1".
If the service can't start, the copy C:\Program Files
(x86)\Java\jdk1.6.0_23\bin\msvcr71.dll into C:\WebApp1\bin\ and the service
will start.
Then WebApp1 is alive!


To get WebApp2 up and running (which I have not test), I would need to
change all the port numbers (for start up, shutdown...etc) so that they
don't conflict with WebApp1.
Then go into C:\WebApp2\bin and type

Service.bat install WebApp2

This will then install a windows service named "Apache Tomcat WebApp2".
Start the service up and WebApp2 goes live!

Simple as that!


Best regards
Conway




-Original Message-
From: Mark Eggers [mailto:its_toas...@yahoo.com] 
Sent: Friday, 4 February 2011 10:41 a.m.
To: Tomcat Users List
Subject: Re: Tomcat Service configuration for running sites

This will be long - read at your own risk.

- Original Message Begin 


Hi,

Thanks to all who answered my previous post regarding running Tomcat with
IIS7.

I am still quite confused about the whole thing, so I think I should try to 
forget about IIS for the time being, and concentrate first on how to get
Tomcat 
service to serve a java website sitting physically outside of Tomcat's
installed 



folder.

BTW, platform is Windows 2008 R2 64bit.
Tomcat installed is 5.5.32. (In my previous question I installed 6.0.30 but
I 
now realised when the website was running on Linux, my manager was using
5.5.23 
and now I can only find 5.5.32 to download. I hope it makes no difference).


For example, Tomcat service is installed on: (... means some more sub
folders or 



files within):
C:\Tomcat\

And the subfolders under this folder are:
C:\tomcat\bin\...   (contains tomcat5.exe, tomcat5w.exe, and 3 .jar files)
C:\tomcat\common\...
C:\tomcat\conf\...   (contains catalina.policy, catalina.properties, 
context.xml, logging.properties, server.xml, server-minimal.xml, 
tomcat-users.xml, web.xml)
C:\Tomcat\conf\Catalina\
C:\Tomcat\conf\Catalina\localhost
C:\tomcat\logs
C:\tomcat\server
C:\Tomcat\server\classes\
C:\Tomcat\server\lib\...   (many .jar files in there, e.g. catalina.jar)
C:\Tomcat\server\webapps\...
C:\tomcat\shared\...
C:\tomcat\temp
C:\tomcat\webapps\ROOT\...
C:\tomcat\work

My Java web application is placed in:
C:\WebApp1\

With subfolders:
C:\WebApp1\bin\...   (contains tomcat5.exe and tomcat5w.exe and many .sh and

.bat files as we previously start this site using the startup.bat before I 
installed the Tomcat service)
C:\WebApp1\common\...
C:\WebApp1\conf\...   (contains catalina.policy, catalina.properties, 
context.xml, logging.properties, server.xml, server-minimal.xml, 
tomcat-users.xml, web.xml specifically used by this website)
C:\WebApp1\conf\Catalina\
C:\WebApp1\logs\
C:\WebApp1\server\
C:\WebApp1\server\lib\...   (many .jar files in there, e.g. catalina.jar)
C:\WebApp1\shared\...
C:\WebApp1\sslcerts\...   (SSL certificates in here)
C:\WebApp1\webapps\ROOT\...   (This is the root of the website. E.g.
default.jsp 



sits in here)
C:\WebApp1\webapps\ROOT\WEB-INF\classes\...   (The java classes we created
to be 



used for the website to interact with back-end database)
C:\WebApp1\webapps\ROOT\WEB-INF\lib\...   (some 3rd party .jar files 
specifically used by this website)
C:\WebApp1\webapps\ROOT\WEB-INF\web.xml   (contains the listener definition,

points to the listener class, so that when this site starts the listener
class 
can perform some initialisation tasks)
C:\WebApp1\work


Question:
1. How should I configure Tomcat service so that it serves the WebApp1
website? 
Which file in which folder to modify?
2. When Tomcat starts WebApp1 website, which set of configuration files is
it 
using? (Those in C:\tomcat\conf\ or those in C:\WebApp1\conf\?)
3. If I am to add another website to the same server, say C:\WebApp2, with
exact 



folder structure as WebApp1, how should I configure Tomcat service so that
it 
serves both WebApp1 and WebApp2?
4. The two sites will use different IP addresses. For example WebApp1 is 
43.88.12.123, and WebApp2 is 43.88.12.133. How do I tell Tomcat which IP
belongs 



to which website?


Again, your input is very much appreciated.

Best regards
Conway

- Original Message End 

Note, I have not tried this, since I normally run multiple Tomcats
using CATALINA_HOME and CATALINA_BASE. I'm basing this off the
documentation found at:

http://tomcat.apache.org/tomcat-5.

Tomcat Service configuration for running sites

2011-02-02 Thread Conway Liu
Hi,
 
Thanks to all who answered my previous post regarding running Tomcat with IIS7.
 
I am still quite confused about the whole thing, so I think I should try to 
forget about IIS for the time being, and concentrate first on how to get Tomcat 
service to serve a java website sitting physically outside of Tomcat's 
installed 
folder.
 
BTW, platform is Windows 2008 R2 64bit.
Tomcat installed is 5.5.32. (In my previous question I installed 6.0.30 but I 
now realised when the website was running on Linux, my manager was using 5.5.23 
and now I can only find 5.5.32 to download. I hope it makes no difference).
 
 
For example, Tomcat service is installed on: (... means some more sub folders 
or 
files within):
C:\Tomcat\
 
And the subfolders under this folder are:
C:\tomcat\bin\...   (contains tomcat5.exe, tomcat5w.exe, and 3 .jar files)
C:\tomcat\common\...
C:\tomcat\conf\...   (contains catalina.policy, catalina.properties, 
context.xml, logging.properties, server.xml, server-minimal.xml, 
tomcat-users.xml, web.xml)
C:\Tomcat\conf\Catalina\
C:\Tomcat\conf\Catalina\localhost
C:\tomcat\logs
C:\tomcat\server
C:\Tomcat\server\classes\
C:\Tomcat\server\lib\...   (many .jar files in there, e.g. catalina.jar)
C:\Tomcat\server\webapps\...
C:\tomcat\shared\...
C:\tomcat\temp
C:\tomcat\webapps\ROOT\...
C:\tomcat\work
 
My Java web application is placed in:
C:\WebApp1\
 
With subfolders:
C:\WebApp1\bin\...   (contains tomcat5.exe and tomcat5w.exe and many .sh and 
.bat files as we previously start this site using the startup.bat before I 
installed the Tomcat service)
C:\WebApp1\common\...
C:\WebApp1\conf\...   (contains catalina.policy, catalina.properties, 
context.xml, logging.properties, server.xml, server-minimal.xml, 
tomcat-users.xml, web.xml specifically used by this website)
C:\WebApp1\conf\Catalina\
C:\WebApp1\logs\
C:\WebApp1\server\
C:\WebApp1\server\lib\...   (many .jar files in there, e.g. catalina.jar)
C:\WebApp1\shared\...
C:\WebApp1\sslcerts\...   (SSL certificates in here)
C:\WebApp1\webapps\ROOT\...   (This is the root of the website. E.g. 
default.jsp 
sits in here)
C:\WebApp1\webapps\ROOT\WEB-INF\classes\...   (The java classes we created to 
be 
used for the website to interact with back-end database)
C:\WebApp1\webapps\ROOT\WEB-INF\lib\...   (some 3rd party .jar files 
specifically used by this website)
C:\WebApp1\webapps\ROOT\WEB-INF\web.xml   (contains the listener definition, 
points to the listener class, so that when this site starts the listener class 
can perform some initialisation tasks)
C:\WebApp1\work
 
 
Question:
1. How should I configure Tomcat service so that it serves the WebApp1 website? 
Which file in which folder to modify?
2. When Tomcat starts WebApp1 website, which set of configuration files is it 
using? (Those in C:\tomcat\conf\ or those in C:\WebApp1\conf\?)
3. If I am to add another website to the same server, say C:\WebApp2, with 
exact 
folder structure as WebApp1, how should I configure Tomcat service so that it 
serves both WebApp1 and WebApp2?
4. The two sites will use different IP addresses. For example WebApp1 is 
43.88.12.123, and WebApp2 is 43.88.12.133. How do I tell Tomcat which IP 
belongs 
to which website?
 
 
Again, your input is very much appreciated.
 
Best regards
Conway

How to serve .net and java websites on Windows 2008 with IIS7 and Tomcat

2011-02-01 Thread Conway Liu
Hi,

We are trying to setup a webserver that will serve multiple aspx (..Net) 
websites 
and and jsp (Java) websites.
The webserver is a Windows 2008 R2 64 bit machine with IIS7.
I have also installed Tomcat 6.0.30 running as a service. The sample web 
application works with no problem on http://localhost:8080

Multiple IP addresses have been created on the webserver, so that each IP 
address will be used for one website.
All websites should be running on port 80, regardless if aspx website or jsp 
website.
I believe to achieve this, we need to use the Tomcat connector for IIS, so that 
IIS will take the request and forward to Tomcat to server jsp pages.

I have gone through 
http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
and http://www.iisadmin.co.uk/?p=72
and successfully got IIS7 to pass request to Tomcat and served the sample jsp 
pages on port 80.
Then I'm stuck...

It seems like the Tomcat service only serves applications from one location 
($CATALINA_HOME)
But we don't want to run the website as
www.ourserver.com/website1
www.ourserver.com/website2

Instead, we need to run them as
www.website1.com
www.website2.com
which is why we have created multiple IP addresses on the server.

And the jsp websites will sit in seperate physical folders on the server, for 
example:
C:\website1\
C:\website2\

I've tried to play around with workers.properties, uriworkermap.properties, but 
without success.
I think there's something to do with $CATALINA_BASE that I need to configure, 
but I don't know how.
So now I beg to know exactly what and how to configure for both jsp websites to 
be served by the Tomcat service, receiving request from IIS7.

If you can give as much detail as possible or point me to any websites that 
have 
detailed information on this matter, I am forever greatful.

Regards and thanks
Conway