setup
Apache Setup
On Mac, apache and php come preinstalled Setup is still needed though
To use your own folder, search for
userdir
in/etc/apache2/httpd.conf
and uncomment the loading of the userdir_ module and uncomment the line including a conf in extra directorythen edit the file including
/etc/apache2/extra/http-userdir.conf
and uncomment include the line for/private/etc/apache2/users/*.conf
cd /etc/apache2/users
andsudo emacs [homedirectory name].conf
Finally, go to
localhost/~[name]
Apache with Php
In
/etc/apache2/httpd.conf
search for Addhandler and addAddHandler php7-script php
which means php extensions will be handledThen search for php and uncomment the php load module
In
cd /private/etc
,sudo cp php.ini.default php.ini
and finally open thephp.ini
fileIn the file, find the real display_errors(prob second) and turn from Off to On
Finally, restart sever and
Last updated