Archive for the ‘Leopard’ Category

Apache Virtual Hosts on OS X Leopard

on Sunday 31st May, 2009 Gabe speculated thusly…

If you develop multiple sites and you need virtual hosting functionality, scroll down to the end of the /private/etc/apache2/httpd.conf file and uncomment the following:

# Include /private/etc/apache2/extra/httpd-vhosts.conf

Next, you’ll need to setup whatever virtual hosts you have in the virtual hosts file /private/etc/apache2/extra/httpd-vhosts.conf

You need to make an entry in the httpd-vhosts.conf file like so:

<virtualhost *:80>
   ServerName beta-site-1.com
   ServerAlias www.beta-site-1.com
   ServerAdmin webmaster@beta-site-1.com
   ErrorLog "/private/var/log/apache2/dummy-host2.example.com-error_log"
   CustomLog "/private/var/log/apache2/dummy-host2.example.com-access_log" common

   DocumentRoot "/Library/WebServer/beta-site-1"
   ScriptAlias /cgi-bin/ "/Library/WebServer/beta-site-1/cgi-bin"
   
     Options FollowSymLinks MultiViews Includes
     AllowOverride All
     Order allow,deny
     Allow from all
   
</virtualhost>

The examples provided by Apple in the vhosts file are slightly incorrect and if you use the CustomLog lines as is you will get errors the following errors if you run: apachectl -t -D DUMP_VHOSTS:
Syntax error on line 40 of /private/etc/apache2/extra/httpd-vhosts.conf:
CustomLog takes two or three arguments, a file name, a custom log format string or format name, and an optional "env=" clause (see docs)

This is because
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log common

Should actually read:
CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common

Posted in Development, Frameworks, HowTo, Information, Leopard, Linux, OS X, Operating System, PHP, Server, Ubuntu

2 Comments »

Get PHP MySQL working on Leopard OS X

on Sunday 31st May, 2009 Gabe speculated thusly…

Installing MySQL on OS X has become infinately easier since you can now download an Apple DMG from the MySQL website which takes care of the fine detail.

However, one thing that changed with Leopard is the socket for Mysql. It moved to /private/tmp, so you may need to configure your php.ini file to point it to the new location.

To do so, open the file /private/etc/php.ini, (if no such file exists, then make a copy of /private/etc/php.ini.default and rename it to php.ini) and edit that.

You have two lines to modify:

mysql.default_socket =

becomes:

mysql.default_socket = /private/tmp/mysql.sock

and mysqli.default_socket =

becomes:

mysqli.default_socket = /private/tmp/mysql.sock

Posted in Information, Leopard, MySQL, OS X, Operating System

No Comments »

Add items to environment path on OS X Leopard

on Sunday 31st May, 2009 Gabe speculated thusly…

Go to terminal and type:
vim ~/.profile

Assuming you want to add the path /usr/local/bin make .profile look like this:
PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

Separating each item with a colon.

Posted in Information, Leopard, OS X, Operating System

No Comments »

Firefox 3 – OS X Memory Hog

on Friday 18th July, 2008 Gabe speculated thusly…

A good article has been written on PC Mech about Firefox 3 being a memory hog. The author got slated by some, but I support the author. From my first hand experience FF3 on OS X Leopard has managed to eat up 650MB RAM with just a few tabs open.

Full article can be found here: http://www.pcmech.com/article/firefox-3-hogs-memory-like-crazy/

Posted in Leopard, OS X

No Comments »

Clear the DNS cache in OS X Leopard

on Tuesday 18th March, 2008 Gabe speculated thusly…

dscacheutil -flushcache

Posted in HowTo, Information, Leopard, OS X

No Comments »

Keeping user data seperate from system data on Apple OS X

on Monday 25th February, 2008 Gabe speculated thusly…

One of the things I grew to like about Linux was the /home directory. Any data for a user was always stored there. Furthermore, you could easily have that home directory on a different disc so when you deleted your system, you didn’t lose your user data too.

(more…)

Posted in Information, Leopard, OS X, Operating System, Tiger

No Comments »