Archive for Apache

Create your own linux/mysql/php development box for Windows or Mac OS X

Download iso of ubuntu server edition 11
Download VirtualBox

Install VirtualBox
Create a new VM with 1000mb ram and 20GB of storage
	- bridge the network connection
	- default install (enable openssh server)
$ sudo su -
$ visudo
$ vim /etc/network/interfaces
	auto eth0
	iface eth0 inet static

$ /etc/init.d/networking restart
$ ifconfig
$ ping  //confirms internet connectivity
$ apt-get update  //update package manager sources
$ apt-get install mysql-server  //install mysql
$ apt-get install apache2
$ apt-get install php5
$ php -v  //confirm php 5.3.5
$ apt-get install samba  //install samba
$ vim /etc/samba/smb.conf
	- enable (uncomment) [homes]
	- read only = no
	- create mask = 0775
	- directory mask = 0775
$ sudo smbpasswd myusername
$ /etc/init.d/smbd restart //restart samba service to apply changes
	- should be able to connect to your smb share via windows or mac (
$ apt-get install git-core


Securing Subversion (SVN) Under HTTPS with Apache

This configuration is used to set up a svn repository under https for apache.

Contents of vhost file

<VirtualHost *:443>

    SSLEngine on
    SSLCertificateFile /websites/_certs/
    SSLCertificateKeyFile /websites/_certs/

    <Location />
        DAV svn
        #SVNPath /repositories/repo_name
        SVNParentPath /repositories

        AuthzSVNAccessFile /repositories/svn-access-policy

        AuthType Basic
        AuthName "Restricted Area"
        AuthUserFile /repositories/.htpasswd
        Require valid-user

<VirtualHost *:80>
    RedirectMatch (.*)$1

Contents of /repositories/svn-access-policy

administrators = user1, user2

@administrators = rw

Comments (1)