to start it
sudo apachectl start
to stop it
sudo apachectl stop
to restart it
sudo apachectl restart
To find the Apache version
httpd -v
cd /etc/apache2/users
sudo nano username.conf
Then add the content below swapping in your ‘username’ in the code below:
Permissions on the file should be: permission checking ls -la
-rw-r--r-- 1 root wheel 298 Jun 28 16:47 username.conf
If not you need to change…
sudo chmod 644 username.conf
sudo nano /etc/apache2/httpd.confAnd make sure these 3 modules are uncommented (the first 2 should be on a clean install):LoadModule authz_core_module libexec/apache2/mod_authz_core.soLoadModule authz_host_module libexec/apache2/mod_authz_host.soLoadModule userdir_module libexec/apache2/mod_userdir.soAnd also uncomment this configuration file also in httpd.confInclude /private/etc/apache2/extra/httpd-userdir.confThen open another Apache config file and uncomment another file:sudo nano /etc/apache2/extra/httpd-userdir.confAnd uncomment:Include /private/etc/apache2/users/*.confRestart Apache for the new file to be read:sudo apachectl restart
沒有留言:
張貼留言