Appleshack.com26
Apr
Search Appleshack.com
 
 
Various Notes for Configuring Apache Web Server on Apple Mac OS X (Leopard)

Work in progress - please check back soon!

The first thing to note about running Apache under Mac OS X is that a number of the default files are located in different positions to the usual Linux installation of Apache. However, once you understand OS X disc hierarchy, it shouldn't be much more complicated than configuring and maintaining Apache under Linux or Solaris.

By default Apache is not running under Mac OS X, so you need to enable/start it from the main System Preferences Sharing panel. Turn on the Web Sharing option. Once this is enabled, you should be able to browse to your Mac's IP address and see the default Apache test page.

This default test page is actually located in /Library/WebServer/Documents/ and is called index.html.en (depending upon your default language).

Important Note: If deleting anything on Mac OS X, do note that the standard Linux rm does not ask for confirmation, as it does on other platforms. The default operation is as if you'd typed rf -rf

The main Apache configuration file is located at /private/etc/apache2/httpd.conf so edit this in order to setup VirtualHosts or other apache configuration options.

The system wide cgi-bin directory is located at /Library/WebServer/CGI-Executables/

The Apache control binary is located at /usr/sbin/apachectl and the log files are created in /var/log/httpd/

Apache log files are located in /private/var/log/apache2/

This is supplemented by a user configuration file (for local webspace) located at /private/etc/httpd/users/<username>.conf

Individual user web sites are stored in /Users/<username>/Sites/

^
 
Valid HTML 4.01! Valid CSS!