apache2
- download source from http://httpd.apache.org/
apache 2.2.6
# we can comment out modules we don't want later ./configure --prefix=/usr/local/apache2 --mandir=/usr/local/man --infodir=/usr/local/info --enable-modules=all --enable-mods-shared=all make sudo make install
Post Install Configuration and Usage
See Also
httpd.conf
- ServerName
ServerName localhost
- DirectoryIndex
DirectoryIndex index.html index.htm index.php index.shtml default.html default.htm
- User/Group
<IfModule !mpm_netware_module> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # #User daemon #Group daemon User www Group www </IfModule>
- Fancy Indexing
# Fancy directory listings Include conf/extra/httpd-autoindex.conf
start apache
# you must specify the path to apachectl because Apple has one in another place sudo /usr/local/apache2/bin/apachectl start
stop apache
sudo /usr/local/apache2/bin/apachectl stop