MacOS – xampp + mac os x issues

apachehostsmacos

just installed XAMPP and have tried setting up a local server but the address won't resolve. It will lead to a "Connection Was Reset" error. I tried looking in the logs but none were present so I'm instantly suspcious of something not being set up right.. but I can't seem to track it down..

here's my vhosts file (/etc/apache2/extra):

<VirtualHost *:80>
    ServerAdmin johndoe@domain.com
    DocumentRoot "/var/www/site"
    ServerName site.local
    ErrorLog "/private/var/log/apache2/site.local-access_log" com$
    CustomLog "/private/var/log/apache2/site.local-error_log"
    <Directory "/var/www/site">
        Require all granted
    </Directory>
</VirtualHost>

and my host file (/etc):

127.1.2.3       site.local
127.1.2.3       www.site.local

Apache (when restarted) starts without any issues so not really sure what's wrong?

Thanks

Best Answer

127.1.2.3 should be 127.0.0.1 that corresponds to your localhost.