After spending many hours (no joke) following several "How to install Apache on Sierra" and reading and trying countless questions and answers I've found on the web, Apache still doesn't work. Trying localhost/~myusername I get "This site can’t be reached localhost refused to connect."
sudo apachectl restart seems to work, but has no effect
apachectl configtest produced many different errors that I to the best of my abilities tried to fix, but it didn't fix the problem and the next apachectl configtest produced a different error - and so on...
The latest one:
[Thu Aug 31 23:48:00.748500 2017] [core:warn] [pid 84060] AH00117: Ignoring deprecated use of DefaultType in line 366 of /private/etc/apache2/httpd.conf. AH00526: Syntax error on line 23 of /private/etc/apache2/extra/httpd-autoindex.conf: <Directory> directive requires additional arguments
I didn't touch autoindex. I've already lost almost all hope.
On my wife's old desktop with El Capitan I've started Apache, PHP and MySQL in less that half an hour. What is this curse on Sierra?
I suspect I've screwed up majestically somewhere and would be happy to start from the beginning, on clean slate - but have no idea how.
Haven't found usable info on re-installing Apache on the web.
Update: Adding code from httpd.conf that seems to be causing the issue...
# DefaultType: the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain