Thursday, July 10, 2008

Enabling SSL on WAMP

This step by step guide explains how you can enble SSL on WAMP.

1. Download WampServer 2.0 from here and install it to the default location [c:\wamp].

2. Now, we need to have a private/public key pair as well as a CA to sign our public key.

First, lets see how we can create a private/public key pair.

keytool -genkey -alias rpcert -keyalg RSA -keysize 1024 -dname "CN=identity-rp,L=SL,S=WS,C=LK" -keypass wso2key -keystore rpkeystore.jks -storepass wso2key

This will create a keystore [rpkeystore.jks] with public/private key pair.

My previous post explains how you can export your private key from the keystore. Just follow the steps given there and you'll end up with a file server.key, which is your private key.

Now, we need to sign our public certificate with a CA.

This - requires us to create a sample CA and following explains how to do that.

Here we use OpenSSL to build the required CA infrastructure. For Windows you can download Win32 OpenSSL v0.9.8g from here.

Once installed make sure you add C:\OpenSSL\bin [i.e [INSTALLED_LOCATION]\bin] to the PATH env variable.

openssl req -x509 -newkey rsa:1024 -keyout cakey.pem -out cacert.crt

The above will creare a public/private key pair for our sample CA.

Now, we need to create a certificate signing request to our server.

Go to the folder where you created the keystore [rpkeystore.jks] and issue the following command.

keytool -certreq -v -alias rpcert -file csr.pem -keypass wso2key -storepass wso2key -keystore rpkeystore.jks

Now copy the csr.pem to the folder where you generated keys for the CA and issue the following command from there.

openssl x509 -req -days 365 -in csr.pem -CA cacert.crt -CAkey cakey.pem -CAcreateserial -out server.crt

By now we have all the requiured files.

cacert.crt --> CA public certificate
server.crt --> Server public certificate signed by the CA
server.key --> Server private key.

Copy all the above three files to c:\wamp\bin\apache\apache2.2.8\conf [assuming you installed WAMP to the default location].

Also edit c:\WINDOWS\system32\drivers\etc\hosts file and add the following entry.

127.0.0.1 identity-rp

If you could recall, when we creating the public certificate for our server, we created it for identity-rp.

3. Edit httpd.conf [C:\wamp\bin\apache\apache2.2.8\conf]

Uncomment the following two lines.

LoadModule ssl_module modules/mod_ssl.so

Include conf/extra/httpd-ssl.conf

Find Listen 80 and change it to Listen 12081 - that is our server is running on port number 12081.

Find ServerName and set it to ServerName identity-rp:12081.

4. Edit httpd-ssl.conf [C:\wamp\bin\apache\apache2.2.8\conf\extra]

Set Listen identity-rp:12444 - we are listening to port 12444 for secure communication.

Set <VirtualHost _default_:12444>

Set DocumentRoot "C:/wamp/www/"

Set ServerName identity-rp:12444

For the entire file find "C:/Program Files/Apache Software Foundation/Apache2.2" and replace with "C:/wamp/bin/apache/apache2.2.8".

Find SSLCertificateFile and set SSLCertificateFile "C:/wamp/bin/apache/apache2.2.8/conf/server.crt"

Find SSLCertificateKeyFile and set SSLCertificateKeyFile "C:/wamp/bin/apache/apache2.2.8/conf/server.key"

Find SSLCACertificateFile and set SSLCACertificateFile "C:/wamp/bin/apache/apache2.2.8/conf/cacert.crt"

5. Edit php.ini [C:\wamp\bin\apache\apache2.2.8\bin]

Uncomment the line extension=php_openssl.dll

6. Now we are done - do a syntax check and start the apache server.

:\> cd C:\wamp\bin\apache\apache2.2.8\bin
:\> httpd -t
:\> httpd --start

7. Type https://identity-rp:12444 on your browser - you'll see a certificate error at the brower - to avoid it install CA certificate in your browser.

27 comments:

crystal said...

Thank you so much!!polo shirt men'ssweate,Burberry Polo Shirts lacoste sweater, ralph lauren Columbia Jackets,ski clothing. Free Shipping, PayPal Payment. Enjoy your shopping experience on mensclothingus.com.You can find the father who desire fashionable, intellectual mens clothing simultaneously.
Puma sport
polo shirts
polo shirts
gillette razor blades
Queen--ugg boots
original polo clothing

crystal said...

Awesome!!!Best wishes for you !!cheap polo shirts is the father of the summer should be prepared to most commonly used item, it has both style and shape of Ralph Lauren Polo, and vest with a random function polo ralph lauren, so that in the short-sleeved apply to both on many occasions, the pink and black color men's polo shirts brought into effect, lightweight cotton, linen texture to demonstrate masculine temperament and sense of fashion exhaustively.

venus said...

God bless you!I really agree with your opinions.Also,there are some new fashion things here,gillette razor blades.gillette mach3 razor bladesfor men.As for ladies,gillette venus razor blades must the best gift for you in summer,gillette fusion blades are all the best choice for you.
real life
chaussures puma zone
chaussures puma online
polo shirts lj's blog
mensclothingus
ugg boots'camp

lj said...

Perfect!!You are a outstanding person!Have you ever wore chaussures puma,Here are the most popular puma CAT,Puma shoes store gives some preview of puma speed cat,and casual but no sweat puma basket.

venus said...

Do not mean bad.Thank you so much!I just want to show some fashion things to all of you.I like puma speed, puma femmes and other puma shoes. These puma sport items are at store recently and available for anyone.

lj said...

Fantastic!God bless you!Meanwhile,you can visit my China Wholesale,we have the highest quality but the lowest price fashion products wholesale from China.Here are the most popular China Wholesale productsfor all of you.You can visit http://chinaclothes.net.Also the polo clothing is a great choice for you.

lljj said...

Do not mean bad.Thank you so much! I just want to show some fashion wedding dress, cheap wedding dresses to all of you. I like wedding dresses, because wedding for a girl, it is the most special day in her life. Do you want to have the beautiful wedding dresses and designer wedding dresses in perfect day?? Here are the most popular discount wedding dresses and lace wedding dresses even plus size wedding dresses for all of you. Also the cheap evening dresses and evening formal dresses are a great choice for you. Let you dream come ture!! When you take part in a party, you can choose party cocktail dresses, also fashion but cheap cocktail dresses and cheap prom dresses here. Besides, the cheap bridesmaid dress and cheap flower girl dresses are also provide to you!

Chang bui thi said...

I would like to thank you for your nicely written post
Signature:
i like play games friv online and play games2girls Download baixar facebook

Huyen Ngo Thanh said...

Thanks for postting Power rangers Games

Elsa said...

A great possibility for me and it was a superb knowledge to view this site. Very difficult to uncover these beneficial web page or web site. I have many devices and achieving proper picture of these worked well and energy continues to be seeing about this weblog. Often my own intend to make my personal site as well as my own enjoyment is growing due to this page. I we do hope you may well be more effective.
happy wheels| cool math games| 8 ball pool| sudoku| yoob| friv| monster high
tetris| shooting games| barbie games| friv4school|

Rick Guerio said...

new year quotes wishes for 2016
click here
read more
homepage


Thanks admin!!

thị hậu nguyễn said...

I do think that is amongst the most interesting articles or blog posts I’ve stay with me that topic. You have made your current factors exciting, unique as well as I accept nearly all. My business is delighted I discovered your current article these days.
agario
super mario bros
pacman

Mai Lân said...

I just want to say : why you do not click to play
puzzle games | mario games | brain games | tetris | happy wheels | agario | super mario

lân Mai said...

I just want to say : why you do not click to play
puzzle games | mario games | brain games | tetris | happy wheels | agario | super mario | abcya

Ann Kelly said...

This is also a very good post which I really enjoyed reading. It is not everyday that I have the possibility to see something like this.
Click to play: open facebook | facebook login | happy wheels | happy wheels game | earn to die | earn to die game

Cherry winter said...

Age of War

In this game, you start at the cavern men's age, then evolve! There is a total of 5 ages, each with its units and turrets. Take control of 16 different units and 15 different turrets to defend your base and destroy your enemy.
Age of War

Age of War 2

Lisa Henry said...

Strike Force Heroes
Strike Force Heroes is a new game action-packed shooter from the creators of Raze; with 3 game modes, 15 campaign missions and over 65 weapons.
Strike Force Heroes 1
For moving in the game you must use the keys Strike Force Heroes 1 or the arrows keys. If you want to jump you can use the keys Up, Space or W. For switching weapon you can use Q or Shift.
Strike Force Heroes 2
is here, much fun. In the second installment of the action-packed shooting game you have to take over your enemy space base at all costs. Move and shoot through several missions and don’t forget to kill all baddies.

Jordan Ovilia said...

Earn to Die Description
Earn to Die sees you not only driving your way through hordes of zombies, but allows you to earn cash to upgrade, unlock and customise new vehicles. Is your vehicle not strong enough? Why not add a gun, or boosters, or even a spiked frame?
earn to die

tank trouble

Jordan Ovilia said...

you get to truly showcase your skill against a wide range of human and AI as you see fit.
With Tank Trouble 3, you don’t have to worry about deadlines nor anything like that, instead this is a fun, relaxing game that you can play whenever you want without any restrictions. It’s really nice and fun to enjoy your time when all you have to do is to destroy the other tanks in the game world. And since the game world is continually changing, offering you more insane challenges, it’s a lot more fun and exciting to explore all of these possibilities in an outstanding way.

tank trouble 3

duyen kull said...

Thanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well.this was actually what i was looking for,and i am glad to came here!
earn to die
Hi! I’ve been reading your blog for a while
now and finally got the courage to go ahead and give youu a shout out from Austin Texas! Just wanted to tell you keep up the fantastic work!my weblog:
earn to die 2

earn to die 3

earn to die 4

Bella Smith said...

Hi! I’ve been reading your blog for a while
now and finally got the courage to go ahead and give youu a shout out from Austin Texas! Just wanted to tell you keep up the fantastic work!my weblog:
tank trouble
tank trouble

earn to die 1

earn to die 2

Mincecraft Games said...

I just want to say : why you do not click to play
- minecraft games
- happy wheels
- happy wheels
- tetris
- brain games
- puzzle games
- agario
- abcdeyaya
- fnaf

Cherry winter said...

Age of War

In this game, you start at the cavern men's age, then evolve! There is a total of 5 ages, each with its units and turrets. Take control of 16 different units and 15 different turrets to defend your base and destroy your enemy.
Age of war 1,2,3,4,5,6


Summon creatures to fight enemy units and demolish the opposing castle. Your castle is equipped with a crossbow, which you can use to shoot enemies. Make sure you upgrade skills to increase your chances of winning battles.
Age Of War play free online Games


The war between humans, orcs and elves continues. Lead your race through a series of epic battles, using your crossbow to fend off foes and sending out units to destroy castles. Researching and upgrading wisely will be crucial to your success!
Age Of War online


Play Age of war 2! Battle your opponent through the ages, in the 2nd installment of the hit game Age Of War. Age of war 2 is totally free and requires no registration!
Age Of War 2


This is an evolutionary strategy game that pits you against alien invaders. You begin the game in the Stone Age, with just a base and some money. Select your base to view the available building options and spend your money wisely. Buy buildings that will spawn offensive units and gatherers, as well as turrets to bolster your defenses. You can upgrade your buildings so that they produce more effective units and spawn them at a faster rate.
Age Of War

Alice Denny said...

Earn to Die Description
Earn to Die sees you not only driving your way through hordes of zombies, earn to die
but allows you to earn cash to upgrade, unlock and customise new vehicles. earn to die 3

Is your vehicle not strong enough? Why not add a gun, or boosters, or even a spiked frame?
age of war
Battle your opponent through the ages,
in the 2nd installment of the hit game Age Of War.
Play Age of war 2!
Age of war 2 is totally free and requires no registration!

Jordan Ovilia said...

Earn to Die Description
Earn to Die sees you not only driving your way through hordes of zombies, but allows you to earn cash to upgrade, unlock and customise new vehicles. Is your vehicle not strong enough? Why not add a gun, or boosters, or even a spiked frame?
earn to die game

Earn to Die 3 is one of those titles that you need to look at with complete …
earn to die game vui

you get to truly showcase your skill against a wide range of human and AI as you see fit.
With Tank Trouble 3, you don’t have to worry about deadlines nor anything like that, instead this is a fun, relaxing game that you can play whenever you want without any restrictions. It’s really nice and fun to enjoy your time when all you have to do is to destroy the other tanks in the game world. And since the game world is continually changing, offering you more insane challenges, it’s a lot more fun and exciting to explore all of these possibilities in an outstanding way.

earn to die
Play Earn to Die 2: Unlock and upgrade vehicles and more vehicular zombie slaughter than ever.
earn to die game play
Earn to Die has been one of those games that has been remarkably popular, having hung around the top charts for a long, long time now. Here you can play the first game – Earn to Die 1.
earn to die23


E-factor Diet said...

Earn to Die sees you not only driving your way through hordes of zombies, but allows you to earn cash to upgrade, unlock and customise new vehicles. Is your vehicle not strong enough? Why not add a gun, or boosters, or even a spiked frame. any review on efactor diet

Mincecraft Games said...

Thank you for sharing your thoughts.I truly appreciate your post thank you once again.
minecraft games | fnaf |tetris - puzzle games
abcdeya | brain games |happy wheels | agario hi