October 12th, 2008
To enable https for your site using VirtualHost follow the following steps.
- Download Apache 2.2.9 with openssl (MSI Installer) from http://httpd.apache.org/download.cgi
- Execute the installer and follow the instructions.
- Make sure Apache is installed properly by pointing your web browser to http://127.0.0.1/ or http//localhost/.
- If you are using default Apache installation directory, navigate to c:\program files\apache software foundation\apache2.2\conf.
- Execute:
openssl req -config openssl.cnf -new -out domainname.csr -keyout domainname.pem
to create a .pem key.
- Execute:
openssl rsa -in domainname.pem -out domainname.key
to create a .key key.
- Delete .rnd file.
- Execute:
openssl x509 -in domainname.csr -out domainname.cert -req -signkey domainname.key -days 365
to create .cert key.
- Create a directory called ssl in the conf directory. Move all keys (cert,csr,key,pem) to the newly created directory.
- Edit httpd.conf.
- Uncomment line that says:
LoadModule ssl_module modules/mod_ssl.so.
- Uncomment line that says:
Include conf/extra/httpd-ssl.conf
- Edit extra\httpd-ssl.conf.
- Under directive <VirtualHost _default_:443>, edit DocumentRoot and ServerName to reflect your site name.
- Point SSLCertificateFile to conf/ssl/domainname.cert
- Point SSLCertificateKeyFile to conf/ssl/domainname.key
- Modify options under <Directory> directives as required.
To know more about what each command does refer to http://www.neilstuff.com/apache/apache2-ssl-windows.htm.
Tags: apache2 windows, https, openssl
Posted in Web Development, Windows | No Comments »
October 11th, 2008
- Download the latest version of phpMyAdmin from http://www.phpmyadmin.net/home_page/downloads.php.
- Extract the content to your desired installation location. (I will use D:\sites\phpmyadmin for this article).
- Edit httpd.conf (Apache) to setup a virtual host by adding
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot “D:/sites/phpMyAdmin”
ServerName phpMyAdmin
<Directory “D:/sites/phpMyAdmin”>
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
lines to the bottom of the file.
- Restart Apache.
- Navigate to phpmyadmin installation directory and copy the file config.sample.inc.php to config.inc.php and edit it as you desired (or download mine here).
- You need to enable a few extensions (edit php.ini) in order to use phpmyadmin. Here’s a few:
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_mcrypt.dll
- Since you are using virtual host, you need to edit your hosts file (%SystemRoot%\system32\drivers\etc\hosts).
127.0.0.1 phpMyAdmin
- Point your browser to http://phpMyAdmin/ .
- You should now be able to login.
- Navigate to Import tab.
- Click Choose File.
- On the popup box, navigate to D:\sites\phpmyadmin\scripts and select create_tables.sql. SQL commands should successfully execute.
- Now, navigate to SQL tab.
- Type: grant all on pmadb.* to ‘pma’@'localhost’ identified by ‘pmapass’.
- Click Go.
- You are all set to use phpMyAdmin now.
Tags: apache, phpmyadmin, virtualhost
Posted in Web Development, Windows | No Comments »
October 10th, 2008
Apache installation on Vista is a breeze. Just use the installer downloaded from http://httpd.apache.org/download.cgi.
If you are looking steps to install PHP using MSI Installer, this isn’t for you. I have tried installing PHP using MSI installer on Vista, and it was a pain. So I decided to manually install and setup the PHP environments.
Below are the steps:
- Download PHP Windows Binaries from http://www.php.net/downloads.php#v5 (zip package).
- Unzip them to your desired location. I recommend not to install PHP on the partition where your Vista resides (e.g. D:\PHP) to avoid UAC annoyance.
- Click on “Vista” icon (or “Start” button) on your desktop, right click on Computer and select Properties. Click on Advanced system settings.
- A dialog box pops up. Click on Environment Variables.
- Under System Variables scroll to find Path variable. Select and click Edit…
- Append your PHP path (e.g. D:\PHP) to the beginning of Variable value. Don’t forget to insert ; after it. And save it.
- Under System Variables click New…
- Variable name: PHPRC, Variable Value: D:\PHP. And save it.
- And just click OK buttons all the way to close all the dialog boxes.
- Open a Command Prompt and execute “php -v” to see if PHP is correctly installed.
- Edit php.ini file (under D:\PHP) and set your extension_dir to “./ext”.
- Edit httpd.conf (Apache’s) and add
LoadModule php5_module “D:/PHP/php5apache2_2.dll”
AddType application/x-httpd-php .php
line to the bottom of the file.
Tags: apache, php, vista
Posted in Web Development, Windows | No Comments »
October 9th, 2008
It took me sometime to understand that the Sidebar RSS Feed is tied to Internet Explorer RSS Feed.
First things first, you need to configure Outlook 2007 to share its RSS Feed. Follow the following steps if you haven’t already enabled Common Feed List:
- In outlook, go to Tools > Options > Others > Advanced Options.
- Put a check in the checkbox next to Sync RSS Feeds to the Common Feed List.
Next is to add RSS Feeds in Outlook 2007. If you look at the list of RSS Feeds in the Gadget, you are able to see the RSS Feed you just added, however, it doesn’t show any contents.
The last step is to open Internet Explorer. Click on the “Star” icon (or press Ctrl+J) and choose Feeds. You will see your newly added Feed, click it.
Refresh your Gadget, and you should see your new Feed entries.
Tags: outlook 2007, RSS Feed Gadget
Posted in Windows | No Comments »