LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 07-10-2012, 01:30 PM   #1
whositwhatnow
Member
 
Registered: Mar 2012
Distribution: RHEL 5/6
Posts: 56

Rep: Reputation: Disabled
Question Tomcat6 and SSL


I'm having a heck of a time getting SSL to work with tomcat6. tomcat6 is installed, apache. port 8080 working no problem.
I have my own SSL certs already set. I want to be able to use port 8443 as my tomcat ssl connection.

now i've uncommented the section in my server.xml

<Connector port="8443" protocol="HTTP/1.1"
SSLEnabled="true"
maxThreads="150"
scheme="https" secure="true"
clientAuth="false"
sslProtocol="TLS"/>
I'm missing something cause its not working. Notes for tomcat are confusing i've reda online there are so many ways people are doing it. I want to use the http option.
 
Old 07-10-2012, 02:11 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by whositwhatnow View Post
I'm having a heck of a time getting SSL to work with tomcat6. tomcat6 is installed, apache. port 8080 working no problem.
I have my own SSL certs already set. I want to be able to use port 8443 as my tomcat ssl connection.

now i've uncommented the section in my server.xml

<Connector port="8443" protocol="HTTP/1.1"
SSLEnabled="true"
maxThreads="150"
scheme="https" secure="true"
clientAuth="false"
sslProtocol="TLS"/>
I'm missing something cause its not working. Notes for tomcat are confusing i've reda online there are so many ways people are doing it. I want to use the http option.
You're missing the keystore. See this article. If you put your ssl keystore in the {tomcat.home}/conf directory then your definition would look like this
Code:
<Connector port="8443" protocol="HTTP/1.1"
                SSLEnabled="true"
                maxThreads="150"
                scheme="https" secure="true"
                clientAuth="false"
                sslProtocol="TLS"
                keystoreFile="conf/mykeystore.keystore"
                keystorePass="changeit"
                />
 
Old 07-24-2012, 08:34 AM   #3
whositwhatnow
Member
 
Registered: Mar 2012
Distribution: RHEL 5/6
Posts: 56

Original Poster
Rep: Reputation: Disabled
Instead of using the separate pem key as above i opted to let apache do the work through SSL. So i added the proxypass in the ssl.conf file.

<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration
DocumentRoot "/var/www/html"
ServerName website.ca:443

<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/


So it works that way BUT now all my other web pages using ssl do not connect(e.g standard web page)
 
Old 07-24-2012, 08:55 AM   #4
whositwhatnow
Member
 
Registered: Mar 2012
Distribution: RHEL 5/6
Posts: 56

Original Poster
Rep: Reputation: Disabled
figured it out !!
I was passing EVERYTHING to tomcat, so all i need to do is create a new entry for tomcat apps and keep everything else pointing to 443.
E.G.

<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration
DocumentRoot "/var/www/html"
ServerName website.ca:443

<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>

ProxyPass /1stapp ajp://localhost:8009/1stapp
ProxyPassReverse /1stapp ajp://localhost:8009/1stapp
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat6: each application -> a different user brgsousa Linux - Software 3 01-18-2011 05:54 AM
Apache2 - Tomcat6 digitolx Linux - Server 2 06-01-2010 08:22 AM
Tomcat6 error srinivasmiriyalu Solaris / OpenSolaris 4 08-07-2009 05:23 AM
tomcat6+httpd issue nileshgr Linux - Server 1 10-25-2007 01:09 PM
Apache2.24-Tomcat6.0.1- JK 1.2.21 how to ?? Idrisk Linux - Software 1 03-08-2007 02:04 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 04:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration