I'm dropping MAMP in favor of native Yosemite apache. I have troubles defining and accessing my vhosts, they seems to be unreachable.
I've followed this gist: https://gist.github.com/GabrielCousin/7522e032ad69879463df
And when do a sudo apachectl -S
I have my vhosts:
[ guillaume MBPro ~ ] sudo apachectl -S
VirtualHost configuration:
*:80 is a NameVirtualHost
default server localhost (/private/etc/apache2/extra/httpd-vhosts.conf:1)
port 80 namevhost localhost (/private/etc/apache2/extra/httpd-vhosts.conf:1)
alias guillaume.dev
port 80 namevhost api.wisembly.dev (/private/etc/apache2/extra/httpd-vhosts.conf:13)
alias static.host.dev
alias api.host.biz
port 80 namevhost app.host.dev (/private/etc/apache2/extra/httpd-vhosts.conf:26)
alias app.host.biz
ServerRoot: "/usr"
Main DocumentRoot: "/Library/WebServer/Documents"
Main ErrorLog: "/private/var/log/apache2/error_log"
Mutex proxy-balancer-shm: using_defaults
Mutex proxy: using_defaults
Mutex default: dir="/private/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/private/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="guillaume" id=501
Group: name="staff" id=20
I've declared these hosts in /etc/hosts
. I reach http://localhost
perfectly, it lists my files and folders in my default directory. But when calling the alias guillaume.dev
, it waits, waits and waits before going into timeout.
When I do a ping guillaume.dev
, it is unreachable:
PING guillaume.dev (172.0.0.1): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
This is the same problem for every other host I define, it seems that ServerName and ServerAlias does not work (since guillaume.dev, alias of localhost does not work but localhost if perfectly defined in the vhosts file and reachable).
Thanks for your help