Skip to content

Instantly share code, notes, and snippets.

@jmdeldin
Created February 6, 2009 23:27
Show Gist options
  • Save jmdeldin/59677 to your computer and use it in GitHub Desktop.
Save jmdeldin/59677 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Setup PHP
sudo mv /usr/local/php5 ~/Desktop/php5_old
curl -O http://www2.entropy.ch/download/php5-5.2.5-6-beta.tar.gz
tar -xzf php5-*-beta.tar.gz
sudo mv php5 /usr/local/
sudo ln -sf /usr/local/php5/entropy-php.conf /etc/apache2/other/+entropy-php.conf
# Basic Apache config for Textpattern
UNAME=$(whoami)
cat > /etc/apache2/users/${UNAME}.conf <<EOF
DocumentRoot /Users/${UNAME}/Sites
<Directory "/Users/${UNAME}/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
EOF
# Enabling vhosts
F='/etc/apache2/httpd.conf'
mv $F{,.bak}
LN='#Include /private/etc/apache2/extra/httpd-vhosts.conf'
sed -e "s,$LN,${LN#\#}," $F > ~/Desktop/httpd.conf.tmp
sudo mv ~/Desktop/httpd.conf.tmp $F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment