Archive for Apache

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

Download iso of ubuntu server edition 11
	http://www.ubuntu.com/download/server/download
Download VirtualBox
	http://www.virtualbox.org/wiki/Downloads


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
			address 192.168.7.55
			netmask 255.255.255.0
			gateway 192.168.7.1

$ /etc/init.d/networking restart
$ ifconfig
$ ping google.com  //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 (http://support.apple.com/kb/HT1568)
$ apt-get install git-core

Comments

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>
    ServerAdmin admin@example.com
    ServerName svn.example.com

    SSLEngine on
    SSLCertificateFile /websites/_certs/example.com.crt
    SSLCertificateKeyFile /websites/_certs/example.com.key

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

        AuthzSVNAccessFile /repositories/svn-access-policy

        AuthType Basic
        AuthName "Restricted Area"
        AuthUserFile /repositories/.htpasswd
        Require valid-user
    </Location>
</VirtualHost>

<VirtualHost *:80>
    ServerName svn.example.com
    RedirectMatch (.*) https://svn.example.com$1
</VirtualHost>

Contents of /repositories/svn-access-policy

[groups]
administrators = user1, user2

[repo_name:/]
@administrators = rw

Comments (1)