How to Set Up Apache and PHP on MacOS



How to Set Up Apache and PHP on MacOS

How to Set Up Apache and PHP on MacOS

Step by step tutorial setting up the default Apache server and loading the PHP5 module on a Mac running MacOS Sierra.

For the httpd.conf uncomment the following
LoadModule authz_host_module libexec/apache2/mod_authz_host.so
LoadModule authz_core_module libexec/apache2/mod_authz_core.so
LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
LoadModule php5_module libexec/apache2/libphp5.so
Include /private/etc/apache2/extra/httpd-userdir.conf
Include /private/etc/apache2/extra/httpd-vhosts.conf

And for the httpd-user.conf uncomment the following
Include /private/etc/apache2/users/*.conf

Restart the Apache server by
sudo apachectl restart

Comments are closed.