Apache2 + Debian Sarge Setup

 Apache: The Definitive Guide (3rd Edition)

The apache2+SSL part was taken from the article Debian, Apache2 and SSL by Ian Miller

Debian Sarge comes with an apache2 package. I thought I’d give this a go to get it working with a self signed SSL certificate. However, I had little idea of what I was doing. Eventually I worked it out - and it’s easy:

Login or su as root

Run: apt-get install apache2

Run the script apache2-ssl-certificate

and tell it what it wants to know.

  • Make a copy of ‘/etc/apache2/sites-available/default’ - call it something like ’ssl’
  • Make a sym-link to this new site configuration from /etc/apache2/sites-enabled/ You will see this is already done for ‘default’.
  • Add a
Listen 443

to /etc/apache2/ports.conf

  • Edit /etc/apache2/sites-available/ssl (or whatever you called your new ssl site’s config) and change port 80 in the name of the site to 443. Also change the virtual host setting. Add the lines “SSLEngine On”, “SSLCertificateFile /etc/apache2/ssl/apache.pem” and “LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so”. My config file reads:
NameVirtualHost *:443   LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so  SSLEngine On  SSLCertificateFile /etc/apache2/ssl/apache.pem   ...
  • Restart apache2
/etc/init.d/apache2 restart
  • HTTPS should work.

Try: https://hostname/


  • Now, let’s start with subversion.
apt-get install libapache2-svn subversion subversion-tools
  • Create a repository.
cd /home mkdir svn chown www-data svn su www-data -c "svnadmin create svn/src"
  • If you let your users run as www-data they will be able to write to your repository!
  • Become root again and add the following lines our apache configuration (ssl), inside of the VirtualHost declaration.
DAV svn     SVNPath /home/svn/src
AuthType Basic     AuthName "My Subversion Repository"     AuthUserFile /home/svn/.dav_svn.passwd     Require valid-user
  • Use this instead of “Require valid-user” if you don’t want to use passwords for read-only access
Require valid-user
  • Let’s add some users.
su www-data -c "htpasswd2 -c -m /home/svn/.dav_svn.passwd galactus"
  • Add another user (don’t use -c or it will recreate the file)
su www-data -c "htpasswd2 -m /home/svn/.dav_svn.passwd ceruno" su www-data -c "htpasswd2 -m /home/svn/.dav_svn.passwd n"
  • Test the repository
  1. Using your browser. Load https://hostname/svn/src/ in your browser. Replace hostname with your host name or ip. You will get something like:
Revision 0: / Powered by Subversion version 1.1.3 (r12730).
  1. From the command line:
svn --username n import checkers https://localhost/svn/src -m "initial import" Authentication realm:  My Subversion Repository Password for 'n': Adding         checkers/trunk Adding         checkers/trunk/gendelta.pl Adding         checkers/site Adding         checkers/branches Adding         checkers/tags
Committed revision 1.
  • Load from the browser again.
Revision 1: /    * branches/    * site/    * tags/    * trunk/ Powered by Subversion version 1.1.3 (r12730).

Â

SEO Made Easy

Brad Cullen is giving away a great little book on SEO strategies. I thought it was a great read and will be applying many of the strategies myself over the coming weeks. Feel free to grab a copy from the link below. It’s hosted locally so you won’t be sent to another website.

SEO Made Easy

Warm Regards,

Shane

Search for the Right CMS Pt 2

It takes a lot of time to evaluate a CMS. That seems obvious but the other side is that it is also incredibly frustrating.

What looks to be good to begin with can have serious flaws.

Â

We kept coming back to exponent as the interface is excellent and the features are quite complete. This main issue with it is that it doesn’t have SEF (Search Engine Friendly) URLs. That being said, the majority of the exponent web site is indexed in google.

Â

The URL issue can be circumvented for the most part using mod_rewrite in Apache2. So for the next few weeks we’ll trial it on UsefulTips. Feel free to have a look around and leave your comments.

Â

I’ll write more about the CMS and how to manage a monetised site using it over the next few weeks.

Â

Take Care,

Shane

Search for the Right CMS

Wow … what a battle.

We’ve been looking at dozens of CMS, trying to find the one with a usable set of feature to achieve a new portal. It has certainly been an interesting and frustrating journey so far. Hopes are high that the latest one we are looking at will have the feature sets we are after.

Wordpress which drives this site is a good even a great blog and with some of the themes and extensions out there makes a fairly decent CMS as well. The main issues are that it doesn’t natively handle multiple sites and we’d like to be able to admin all sites from a single interface. A lot of the CMS that claim to have multisite support really mean that you can have multiple sites from a single code base install. Technically they are correct, however when you are looking at having a single interface to drive the lot it doesn’t meet the criteria.

A lot of the very active and popular CMS out there are difficult to use, administer, update and maintain. There are some that look truly promising, only to fall down on necessary criteria like Search Engine Friendly (SEF) URLs. Exponent is one to look for as it gets closer to a 1.0 release.

We are about to run up and have a look at Xaraya, which looks to have most if not all of what we want.

Stay tuned for updates.

Warm Regards,

Shane

UsefulTips.info Launched

Memphis Consulting is proud to announce the launch of a new site.

www.usefultips.info is a new portal for finding articles and tips on many many subjects. We’ll be adding more tips, articles and subjects over the coming weeks.

Take a look and let us know your comments.

Warm Regards,

Shane Lowry