Creative Commons License
Drekendrop | Blog of Tutorial by Mei Pakpahan is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at drekendrop.blogspot.com.
Permissions beyond the scope of this license may be available at http://softdadesign.co.nr.

Share This

Monday, February 7, 2011

Install OpenSSL and cURL on Appserv Windows XP 32-bit


What i want to share here is something that you might have tried hard and didn’t return you any success. I’ve tried to understand and install it onto my Windows XP and thank God it works after a long.
First you need these kind of files :
1. openssl.exe
2. openssl.conf
3. abs.exe
4. mod_ssl.so
5. libeay32.lib
6. ssleay32.lib
1st Step ——–
Copy openssl.exe, abs.exe, openssl.conf onto [drive]:\AppServ\Apache2.2\bin
2nd Step ——–
Copy mod_ssl.so onto [drive]:\AppServ\Apache2.2\modules
3rd Step ———
Copy libeay32.lib and ssleay32.lib onto C:\Windows\system32
4th Step ——–
Open httpd-ssl.conf which is located in [drive]:\AppServ\Apache2.2\conf\extra and modify as shown below :
ServerName [your_host_name]:443
ServerAdmin admin@[your_host_name]
then save it.
5th Step ———
Open httpd.conf which is located in [drive]:\AppServ\Apache2.2\conf and modify as shown below :
change #LoadModule ssl_module modules/mod_ssl.so to
LoadModule ssl_module modules/mod_ssl.so —> (remove #)
change #Include conf/extra/httpd-ssl.conf to
Include conf/extra/httpd-ssl.conf —> (remove #)
6th Step ———
Generate SSL Certificate
by using Command Prompt go to [drive]:\AppServ\Apache2.2\bin
and type as shown below :
[drive]:\AppServ\Apache2.2\bin > openssl.exe req -config openssl.cnf -new -nodes -out server.csr -keyout server.key
answer all the questions and press enter on after you answer question one by one.
when it came to the question Common Name, you have to fill it as your_host_name
then type :
[drive]:\AppServ\Apache2.2\bin > openssl.exe x509 -in server.csr -out server.crt -req -signkey server.key -days 365 -set_serial 1
7th Step ———–
Move server.key and server.crt from [drive]:\AppServ\Apache2.2\bin onto [drive]:\AppServ\Apache2.2\conf
Delete server.csr and .rnd
8th Step ———–
Open php.ini which is located to C:\Windows and modify as shown below :
remove the semicolon (;) from ;extension=php_curl.dll, ;extension=php_openssl.dll, ;extension=php_xmlrpc.dll
9th Step ————-
Restart your Apache server.
10th Step ————
Test your ssl by browsing https://your_host_name/
Test your cURL by using this php script:
<?php
$url = “http://www.google.com/“;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$returned = curl_exec($ch);
curl_close ($ch);
echo $returned;
?>
it should has return (from www.google.com) :
302 Moved
The document has moved here.
Those are 10 Steps to install OpenSSL and cURL on AppServ under Windows XP 32-bit.

1 comments:

Anonymous said...

Hello, I have AppServ 2.5.10
this installs
Apache 2.2.8
PHP 5.2.6
MySQL 5.0.51b
phpMyAdmin-2.10.3

How do I enable ssl there in two different scenarios. one making my own certificate to test in my localhost and tow buying a certificate and installing it to use it as my domain name. ( I want to host my own site)

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Grants For Single Moms