Eclipse IDE with SSL
I have SSL running on my MAMP server. One of my projects has all the drupal /admin pages under SSL.
First, how to do that? I followed instructions on this page:
http://www.webopius.com/content/355/getting-mamp-working-with-ssl-on-os-x
which include
- generating a free ssl certificate and installing it under the MAMP directory
- configuring ssl.conf in MAMP/conf/apache to find your certificate, listen at port 443, and name your local ssl site
- changing MAMP config in http.conf to use port 80 instead of its usual 8888.
That was successful and fine until getting into development, I tried to use my Eclipse debugger. No go. How to debug an SSL with Eclipse??
Here's how to do it.
I downloaded and installed stunnel:
http://mac.softpedia.com/get/Internet-Utilities/stunnel.shtml
stunnel takes http input and puts out https output. In my case, communication between Eclipse and stunnel is in plain text, but between stunnel and www.mylocalsecuresite.com:443 is encrypted.
stunnel.config file sets stunnel up to listen at port 88 and connect to my local secure site with these lines:
[https]
accept = 88
connect = www.mylocalsecuresite.com:443
stunnel is started with a command line:
$stunnel pathto_stunnel.config
The Eclipse debug server is
localhost:88
The Eclipse debug configuration starts with index.php under the webroot of the drupal site. I have to log in to the admin portion to get to the protected pages.
One more thing... had to disable SecurePages module in Drupal (and clear caches a few times!!) for this to work!
Many thanks to Michal Niklas who answered my question on stackoverflow.com and got me thru this 'tunnel'!!
- maryedith's blog
- Login to post comments