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

and my host file (/etc):       site.local       www.site.local

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


0 should be that corresponds to your localhost.

  • The ip for a localhost can be set to anything within the 127. range and work.. or at least it does in windows, I changed the .1. to .0. and that worked, I think the IP has to be set in the format of 127.0.x.x to work... bit of a weird thing but whatever gets it to work, will mark yours as right as you implied changing the IP to fix it which did fix it but the logic behind it is invalid (ish) Thanks :) – TT12043205 Oct 7 '15 at 12:30
  • Well, at least you solved! :D I always used that one for localhost, by the way I have no idea about the possibility to use another one for localhost. I'm not caring about it anymore since I'm now using vagrant for local development (virtual machines, take a look on it and you'll love it). – phaberest Oct 7 '15 at 13:06
  • vagrant? I dont think Ive come across it in my web dev travels haha will take a look at it, thanks again :p – TT12043205 Oct 7 '15 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .