Apache Server

Image

Set up an http server on a macbook pro with Apache 

  1. check for apache on: ps aux | grep http

    httpd is the nickname for apache that is recognized on mac unix.

  2. start apache: sudo apachectl start

  3. stop apache: sudo apachectl stop

  4. restart apache: sudo apachectl restart

  5. apache default document root path: /Library/WebServer/Documents

  6. apache config: /etc/apache2/users

  7. uncomment in /etc/apache2/httpd.conf: Include /private/etc/apache2/extra/httpd-userdir.conf

  8. and: Include /private/etc/apache2/extra/httpd-userdir.conf

  9. uncomment in /etc/apache2/extra/httpd-userdir.conf: Include /private/etc/apache2/users/*.conf

  10. uncomment in /etc/apache2/extra/httpd-userdir.conf: LoadModule authz_core_module libexec/apache2/mod_authz_core.so 

  11. and: LoadModule authz_host_module libexec/apache2/mod_authz_host.so

  12. enable php by uncomment in …/httpd.conf: LoadModule php5_module libexec/apache2/libphp5.so