LAMP How To – Open Source At Work

Only Passion Matters

Entries for the ‘Think Technology’ Category

Preserving HTML in XML

Characters like “<” and “&” are illegal in XML elements. “<” will generate an error because the parser interprets it as the start of a new element. “&” will generate an error because the parser interprets it as the start of an character entity. Some text, like JavaScript code, contains a lot of “<” or [...]

SVN over HTTP

Objective
I want to be able to browse the svn dir from a website like http://zeus.dev/svn.php and at the same time, be able to checkout from the repository via http://zeus.dev/svn/projectname
How

First of all, install mod_dav_svn
Then in the apache config, I am using vhost for example
<VirtualHost *:80>
DocumentRoot /home/data/zeus.dev/apps/
ServerName zeus.dev
# this is for [...]

Quick SVN Tutorial

Create New Repo
svnadmin create /home/data/svn/[dir-name]
chown apache:developer -R /home/data/svn/[dir-name]
chown 2770 /home/data/svn/[dir-name]

Import New Site

ssh into server
to import new site to the trunk,

svn import [your-site] file:///home/data/svn/[your-site-name] -m “[import comments]”

View Available Sites In Trunk
svn ls file:///home/svn/trunk/

Checking Out a Site

Create a directory to checkout and use ’svn co’

cd ~
mkdir [my-site]
svn co file:///home/svn/trunk/[site-name] [my-site]

Updating a [...]

Implementing SSL Certificates in Apache

Creating a Private Key
To create a private key without triple des encryption, use the following command:
openssl genrsa -out ssl.key 1024

Creating a Certificate Signing Request
To obtain a certificate signed by a certificate authority, you will need to create a Certificate Signing Request (CSR). The purpose is to send the certificate authority enough information to create the [...]

Highly available load Balancer + web server in centos

This tutorial is about creating a highly available HTTP load balancer using HAProxy. The setup can be slightly complicated but you will appreciate the result – you will get a load-balanced + highly available web service in your network. Basic linux skill is assumed.
Scenario:
Imagine we have 2 physical machines. In each machine, I have 2 [...]