Abbey Workshop

Apache on Mac OSX

This page documents the location of information for Apache on Mac OS X.

Directory Locations

Document Directory /Library/Webserver/Documents
CGI-BIN Directory /Library/Webserver/CGI-Executables
Configuration Files /etc/httpd/httpd.conf
Default Log Files /privat/var/log/httpd (both error and access logs can be found here.

Given the length of the names, it is a good idea to create symbolic links to both directories in your home directory. For example:

ln -s /Library/WebServer/Document ~/htdocs

Starting and Stopping the Server

The server is started and stopped with the apachectl program. The program is located in the /usr/sbin directory. To restart the server, follow these steps.

  1. Type sudo bash to become super user
  2. To stop the server type: apachectl stop
  3. To start the server type: apachectl start
  4. Type exit to end your super user shell session

Getting PHP to Work on Mac OS X and Apache

Having just done a fresh install of Panther (10.3) I recently noticed that PHP is not working correctly for some of my script files. A quick look through the httpd.conf file I found that the PHP module had not been included as one of the startup modules. So below is a summary of the sections that need to be set on the conf file for PHP to work.

In the Dynamic Shared Object Section (DSO) make sure the php LoadModule command is not commented out:
LoadModule php4_module libexec/httpd/libphp4.so

In the section just below, make sure that the AddModule command is also not commented out.
AddModule mod_php4.c

The conf file also included these module directives toward the end of the file.

<IfModule mod_php4.c>
    # If php is turned on, we repsect .php and .phps files.
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    # Since most users will want index.php to work we
    # also automatically enable index.php
    <IfModule mod_dir.c>
        DirectoryIndex index.html index.php
    </IfModule>
</IfModule>
	

That's it. After all that was set everything worked swimingly. For more information about Apache or PHP on Mac OS X. See Apple's developer site at: http://developer.apple.com/internet/

Google
  Web abbeyworkshop.com   

Copyright © Abbey Workshop 2006

Music Only Search
The Black MP3 Album
The MP3 Album Lyrics
Wprld Music Plus
Mp3 Songs Blog
Music Search Store
First Music Search
Mega MP3 Blog
E MP3 BLog
My MP3 Diary
Fast MP3 Finder
My Blog MP3
Mp3 Songs Mart
My MP3 Songs Album
Top Music Group
Mp3 Tune Records
Song Album Guide
Music DataDite
MP3 Buying Guide
Top MP3 Downloads
MP3 Tune Festival
FAST MP3 Downloads
MP3 Mart Online
Upper MP3
Premium MP3 Site
Music Data online
Fine MP3 Audio
Cheap Music Albums
Fine mp3 downloads
World MP3 Music Records
Mp3 Music Data Direct
The Fine Mp3
MP3 Files World
Home Music Store
DatMP3
Fat MP3 Audio
MP3 ZigZag
MP3 Songs Direct
MP3 Tune World
E MP3 Log
Boom MP3 Music
Speedy MP3
Top 20 MP3 music
Deep MP3 World
Deep MP3 Download
Best-20 MP3
Top Twenty MP3
Deep MP3
Big MP3 Guide
Deep MP3 Audio
Mp3 R.O.B.
MP3-Pop Online
Greate-20-MP3
MP3 Appear
3T-MP3