Error starting apache from terminal after uninstalling MAMP

I recently uninstalled MAMP.

When I try to start apache from the terminal using:

sudo apachectl -k restart

I get a message

Warning: DocumentRoot [usr/docs/dummy-host.example.com] does not exist.
+5
source share
3 answers

First, make sure that you are actually trying to execute the correct version of apachectl by issuing the following command:

which apachectl

(Here you do not want to see MAMP links).

Then find the configuration of your virtual hosts (which is probably here if your MAMP links are gone)

/etc/apache2/extra/httpd-vhosts.conf

Make sure your virtual host definitions are good. (It looks like you are referring to a bad one).

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot "/Users/yourusername/Sites/mysite"
    ServerName mysite.local
    ErrorLog "/private/var/log/apache2/mysite-error_log"
    CustomLog "/private/var/log/apache2/mysite-access_log" common
</VirtualHost>

( , "localhost", , , /etc/hosts , :

127.0.0.1          mysite.local

apache!

sudo apachectl restart
+9

, apache (- etc/apache2/apache2.conf) . DocumentRoot .

0

, /etc/apache 2/extra/httpd-vhosts.conf, .

0

All Articles