Answer the question
In order to leave comments, you need to log in
Why can't Apache see hosts?
After reinstalling Sierra, I decided not to use stock Apache anymore, but to install it from homebrew. If in order:
Listen 8080
User me_user
Group staff
ServerName localhost:8080
DocumentRoot "/users/me_user/projects"
<Directory "/users/me_user/projects">
......
</Directory>
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
# Virtual hosts
Include /usr/local/etc/apache2/2.4/vhosts/*.conf
Alias /phpmyadmin /usr/local/share/phpmyadmin
<Directory /usr/local/share/phpmyadmin/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
<VirtualHost *:8080>
ServerName test.dev
AddDefaultCharset UTF-8
DirectoryIndex index.php index.html
DocumentRoot /users/me_user/projects/test
ServerAlias www.test.dev
# LOGS
CustomLog /Users/me_user/projects/logs/test.dev/access.log combined
ErrorLog /Users/me_user/projects/logs/test.dev/error.log
<Directory /users/me_user/projects/test>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question