Hello,
I am trying to use Apache2 to set up an SSL-connection with Alfresco. I have a reversed proxied Alfresco with Apache2 and SSL, but I get warnings that the connection isn't entirely encrypted. (Warning: Connection Partially Encrypted) Is there something I have to do on the Alfresco/Tomcat6 side?
Excerpt from http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
Quote:
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.
So according to the Apache2 documentation it should be sufficiant to encrypt the traffic from/to the Apache2 proxy and not Tomcat6 itself.
So why is the encrypted connection failing? This is in all browsers I've tried, Firefox, IE8, Safari, etc...
Please advice,
Oblivian
—
gronfelt
- Posts
- 278
- Achievements
- 5
- Member for
- 4 years 2 months
- From
- Sweden
Stats
What does the configuration look like?
Personally I prefer to use mod_jk when proxying Tomcat with Apache, it's very simple to setup and seems to be pretty failsafe:
http://tomcat.apache.org/connectors-doc/generic_howto/quick.html
Feel free to rate this post as useful if it was of any help to you.
oblivian
- Posts
- 38
- Achievements
- 2
- Member for
- 3 years 10 months
Stats
Hi gronfelt,
This is the current Apache2 SSL config running the reversed proxy.
oblivian
- Posts
- 38
- Achievements
- 2
- Member for
- 3 years 10 months
Stats
Hi again gronfelt,
I am quite new to Tomcat6... Could you enlighten me on why you prefer mod_jk over ordinary apache proxying? Is it better speedwise, more secure, or just easier, etc... Thanks for sharing. :)
BTW, I am currently on Ubuntu 9.04 server. When running a2enmod I have module proxy_ajp available. Is that the same as mod_jk? Also, is it just Apache2 I have to configure (like with normal proxy) or do I have to configure Tomcat6 as well?
EDIT: proxy_ajp is not the same as mod_jk. apt-get install libapache2-mod-jk installed the correct Apache2 module... :oops:
Regards,
Oblivian
gronfelt
- Posts
- 278
- Achievements
- 5
- Member for
- 4 years 2 months
- From
- Sweden
Stats
Well, to a great extent it's probably just due to the fact that I started to use mod_jk and got used to that.
But as far as I understand using ajp is normally much faster than accessing tomcat through http, but wether you choose to use proxy_ajp/proxypass or mod_jk seems to be mostly a matter of taste.
Tomcat configuration is the same, regardless, the only thing you need to do is to uncomment the AJP connector in server.xml.
Feel free to rate this post as useful if it was of any help to you.
oblivian
- Posts
- 38
- Achievements
- 2
- Member for
- 3 years 10 months
Stats
Hi gronfelt,
I have now set up Apache2 to use mod_jk and it works perfectly with Alfresco/Tomcat6. All traffic is now sent correctly over SSL and so no more warnings. :D
Thanks for all your help.
Oblivian
Rhino
- Posts
- 14
- Achievements
- 1
- Member for
- 5 years 11 months
Stats
I have Alfresco working with SSL, however in IE8 I keep getting a security warning that pops up on every single page telling me that some of the pages are non-secure. This is true, there is one hardcoded Alfresco call to http://www.alfresco.com/assets/images/common/alfresco_community_horiz30.gif
This one http call are the only one that's not transferred into a https page. After reading the following I tried to upgrade to the latest Alfresco build without luck. https://issues.alfresco.com/jira/browse/ETHREEOH-2331
Do you have this also? Did any manage to get this to work? :cry:
oblivian
- Posts
- 38
- Achievements
- 2
- Member for
- 3 years 10 months
Stats
I use to have the same problem when running Alfresco with Apache reverse proxy over SSL. When using mod_jk instead, all problems vanished.
I recommend you do the same.
Regards.
Rhino
- Posts
- 14
- Achievements
- 1
- Member for
- 5 years 11 months
Stats
That sounds really good :D
Could you post your configuration files, that would help me alot. You are right, I was running reverse proxy over SSL but after reading this page I tried to change to mod_jk, apparently without any luck :oops:
oblivian
- Posts
- 38
- Achievements
- 2
- Member for
- 3 years 10 months
Stats
Hi,
Sorry for late reply. Did you manage or do you want me to post my configs?
Oblivian
PS. What platform are you on? I'm on Ubuntu 9.04.
Rhino
- Posts
- 14
- Achievements
- 1
- Member for
- 5 years 11 months
Stats
Right now its not working, so I would be very happy to take a deep look at your config files (apache and tomcat server.xml) :)
I am running on a Debian 5 server.
oblivian
- Posts
- 38
- Achievements
- 2
- Member for
- 3 years 10 months
Stats
OK, here goes.
Make sure mod_jk is installed and enabled in Apache2.
Add the following at the bottom of the main Apache2 config file. (apache2.conf)
Create a new file: /etc/apache2/worker.properties and enter the following. (Make neccesary adjustments to the java_home and tomcat_home)
Add the following to server.xml (On Ubuntu 9.04 /etc/tomcat6/server.xml)
Add the following lines
NB. Add the above lines just before the following lines: (Around line 70).
Add the following lines to the Apache2 SSL-enabled virtual server: (Just before the the virtualhost close tag)
And that should be it.
Good luck! :)
PS. You have to restart both Apache2 and Tomcat6 too se the changes of course...
Rhino
- Posts
- 14
- Achievements
- 1
- Member for
- 5 years 11 months
Stats
Beautiful, so simple and jet so complicated... Its working, thank you very much :D