SSL with Tomcat addon of xampp???

Problems with the Windows version of XAMPP, questions, comments, and anything related.

SSL with Tomcat addon of xampp???

Postby mikkel » 19. February 2010 17:58

Pardon my English is not good.

I'm trying to enable ssl security in Tomcat addon of xampp, and i'cant. In Apache ssl works well but not in Tomcat.

I try first with the tomcat ssl how to:
1. Create a certificate keystore by executing the following command:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RS

2. Uncomment the "SSL HTTP/1.1 Connector"

But when i put in the browser https://localhost:8443 it remains loading.... .......

On the other side i found this information in tomcat ssl how-to:
It is important to note that configuring Tomcat to take advantage of secure sockets is usually only necessary when running it as a stand-alone web server. When running Tomcat primarily as a Servlet/JSP container behind another web server, such as Apache or Microsoft IIS, it is usually necessary to configure the primary web server to handle the SSL connections from users. Typically, this server will negotiate all SSL-related functionality, then pass on any requests destined for the Tomcat container only after decrypting those requests. Likewise, Tomcat will return cleartext responses, that will be encrypted before being returned to the user's browser. In this environment, Tomcat knows that communications between the primary web server and the client are taking place over a secure connection (because your application needs to be able to ask about this), but it does not participate in the encryption or decryption itself.

I think i have to configure some conf file in xampp but i don't know how.

Please i need some HELP!! Thank's in advance!!!! Please any IDEA.
Posts: 2
Joined: 19. February 2010 17:43

Re: SSL with Tomcat addon of xampp???

Postby mikkel » 22. February 2010 12:03

Please help me...I'm trying to make a web service with axis2, and i want to secure it with usernametoken over ssl. The usernametoken in the header is OK. But i' can't SSL the tomcat addon of xampp

I have to put listen 8443 and virtualhost to tomcat?¿?¿? I'am a bit lost
Posts: 2
Joined: 19. February 2010 17:43

Re: SSL with Tomcat addon of xampp???

Postby elk_iii » 04. March 2010 04:29

I took a slightly different approach but it may work out better for you.
The basics are connect apache to tomcat using ajp and the mod_jk objects.

This approach uses tomcat on 8080 and apache for the ssl part on 443.

The basic process is as follows:
  • In tomcat_home\conf\server.xml you need to define an AJP connector on port 8009. I think there is one predefined but commented out. if not it should be the last connector before the <engine name="catalina".... > tag.
  • After the <engine name="catalina".... > tag, add a listener for the shared module mod_jk.
    <Listener className="org.apache.jk.config.ApacheConfig" modJk="C:\XAMP\apache\modules\"/>
  • Stop and restart tomcat.
  • if all is going well tomcat should create a two folders under tomcat_home\conf\ one called "auto" with a file called mod_jk.conf the other called "jk" with a file.
  • Tomcat is now running and has port 8009 listening from requests from apache now you need to have apache use mod_jk
  • Open the mod_jk.conf file there will be a LoadModule command and jkMount commands that you need to move to apache
  • edit the apche\conf\http.conf file
  • look for a series of LoadModule commands and add the line from the mod_jk.conf file. Note, in "theory" the LoadModule command should get picked up when the mod_jk.conf file gets loaded, but I found that it didn't.
  • if you just want to configure regular http traffic on port 80 at the end of the http.conf file add a include line for the mod_jk, xampp may put one in at the end as follows:
    Include "C:/XAMP/apache/conf/extra/mod_jk.conf"

    In the included file it then has another include to include the tomcat file. i.e.C:/XAMP/apache/conf/extra/mod_jk.conf contains:
    # Tomcat auto-configure
    Include "c:/XAMP/tomcat/conf/auto/mod_jk.conf"
  • If you want ssl support you also need to mount the files in the 443 virtual host, the definition of the virtual host for 443 traffic is in C:/XAMP/apache/conf/extra/httpd-ssl.conf. here before the default virtual host tag is closed you need to add your jkMount statements to redirect the traffic.

    <VirtualHost _default_:443>

    JkMount /appName ajp13
    JkMount /appName/* ajp13
  • Then stop and restart apache and you should be good to debug
Posts: 2
Joined: 03. March 2010 23:44

Re: SSL with Tomcat addon of xampp???

Postby tgkprog » 05. April 2010 13:57

elk_iii wrote:I took a slightly different approach but it may work out better for you.
hello elk_iii
after you make these changes on what address will tomcat with ssl be available?

right now I get my jsp at http://localhost:8080/apage.jsp

what do I need to change this to see the ssl version?

https://localhost:8009/apage.jsp did not work, says connected (in browser status bar) than nothing happens
Posts: 3
Joined: 10. November 2009 18:07

Re: SSL with Tomcat addon of xampp???

Postby tgkprog » 17. September 2013 19:30

Port 443 - default :-) got it to work later, had another server running on 443 so was not working.
Posts: 3
Joined: 10. November 2009 18:07

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 54 guests