I have the following problem
My hosts file is as follows:
127.0.0.1 localhost
127.0.1.1 barbala4o-HP-ProBook-4530s
127.0.1.1 mysite.local
For Apache 2.4.6 in Ubuntu 13.10,
You will have
/etc/apache2/apache2.conf
/etc/apache2/sites-available/000-default.conf
And
/etc/apache2/sites-enabled/000-default.conf points to /etc/apache2/sites-available/000-default.conf
Now, edit apache2.conf and add
#YOUR SETTINGS
and edit sites-available/000-default.conf and change to to make apache listen localhost (on port 80) for your default settings.
Now to make mysite.localhost work, add this to sites-available/000-default.conf
ServerName mysite.localhost
ServerAdmin webmaster@mysite.localhost
DocumentRoot /home/my_new_site_public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Now edit your /etc/hosts/ file and change the IP of mysite.localhost from 127.0.1.1 to 127.0.0.1
Now visit http://mysite.localhost & http://localhost
:)