Although instructions are provided for many web servers/systems there are no instructions on the VeriSign web site on how to setup Nginx.
One tip that may save you a couple of minutes is that your Nginx SSL configuration will not work correctly with the VeriSign provided Apache CA bundle of intermediate certificates.
To get a certificate bundle that will work properly I suggest the following steps.
- First download both the Primary Intermediate CA Certificate and the Secondary SSL Intermediate CA Certificate files.
- Second, concatenate your certificate, then the primary CA certificate, then the secondary certificate into a single file.
- Third reference the resulting file in your nginx SSL configuration, verify your configuration, and restart nginx.
To ensure everything is setup correctly you can verify your site using the VeriSign Certificate Check application.
Magento is an interesting and emerging player in the e-commerce space. I wanted to get a feel for the application so I thought I’d install a copy of the community edition in a Linode VPS.
Although you can run all of the following as the root user, it is strongly recommended to create a non-root account and run the following commands using sudo.
- Become a Linode customer and create an instance in the Linode Manager using the Ubuntu 9.10 profile.
- SSH into your VPS instance using the root account and the password that you configured when provisioning your Linode.
- Install the core software for a LAMP Server (Apache, MySQL, PHP) by running the following command:
sudo tasksel install lamp-server
A blue installation progress screen will appear, you’ll be asked to provide certain configuration parameters (like a root password for MySQL.
When the blue screen disappears the installation of Apache, MySQL and PHP will be complete.
- Edit /etc/apt/sources.list and uncomment the ‘universe’ repsoitories.
- Update apt so that it is aware of the new repositories by running the following command:
sudo apt-get update
- Install mcrypt by running the following command:
$ sudo apt-get install php5-mcrypt
- Enable mcrypt by editing the php.ini file by editing /etc/php5/apache2/php.ini and adding the following line to
the extensions section of the php.ini file:
- Generate new Symlinks in /etc/apache2/mods-enabled so that Apache 2 enable the extension for URL rewriting by running the following
$ sudo a2enmod rewrite
- Next the following lines need to be put at the end of /etc/apache2/apache2.conf:
(Assuming that Magento is going to be installed in /var/www/magento otherwise, edit the path accordingly)
- Next install the additional software required for the installation with the following commands:
$ sudo apt-get install php5-curl php5-gd subversion
- Restart Apache for the PHP settings and the Apache settings to take affect:
$ sudo /etc/init.d/apache2 restart
- Create a MySQL database for the installation with the following command:
$ sudo mysqladmin -u root -p create 'magento'
- Install Magento from subversion using the following commands:
$ cd /var/www
$ sudo svn checkout http://svn.magentocommerce.com/source/branches/1.3
$ sudo mv 1.3 magento
- Set the correct permissions for the installation wizard with the following commands:
$ sudo chown -R www-data.www-data /var/www/magento/app
$ sudo chown -R www-data.www-data /var/www/magento/var
$ sudo chown -R www-data.www-data /var/www/magento/media
$ sudo chmod 770 /var/www/magento/app/etc
$ sudo chmod 770 /var/www/magento/var
$ sudo chmod 770 /var/www/magento/media
$ sudo chmod 770 /var/www/magento/media/downloadable
$ sudo chmod 770 /var/www/magento/media/import
- You should now be able to run the Magento Installation Wizard by pointing your browser at http://hostname/magento/ .
Your mileage may vary but the above steps worked for me.
This post was inspired by Installing Magento on Slicehost with Ubuntu.