Virtual Host showing error 11001 even after chown and chmod

  • Posted on February 25, 2015
  • prodicusAsked by prodicus

I am trying to create a virtual host to just test a basic html website.

Guest OS - Ubuntu 14.04 Host OS - Ubuntu 14.10

In the Host OS, I connect through a proxy server which requires me to enter a user ID and password. I have a bridged network in the guest OS and I am able to connect to the internet in it.

So far I have done these steps.

1) Created the .conf file in /etc/apache2/sites-availableby doing this sudo cp 000-default.conf tasdikr-1081310234.conf

Then I edited it by sudo gedit tasdikr-1081310234.conf to something like this

<VirtualHost *:80>

#---------- Changes made -------------------

DocumentRoot /var/www/tasdikr-1081310234

#---------- Changes made -------------------

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


2) Made the directory through this

sudo mkdir /var/www/tasdikr-1081310234
sudo chown $USER:www-data /var/www/tasdikr-1081310234
sudo chmod g+s /var/www/tasdikr-1081310234
sudo gedit /var/www/tasdikr-1081310234/index.html

Inside index.html I did something like this

  Welcome to!

3) After that I changes thehosts file in /etc/hosts

and after changing it looked something like this	localhost	tasdik

#---adding lines for my website---	tasdikr-1081310234

#--------adding stuff done--------

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

4) After that I added my site by running

sudo a2ensite tasdikr-1081310234

And restarted apache

sudo service apache2 restart

It gave me a message like this

* Restarting web server apache2 
AH00558: apache2: Could not reliably determine the server's fully qualified
domain name,using Set the 'ServerName' directive globally to suppress this message
                                                                            [ OK ]

5) I entered the url and

http://tasdikr-1081310234 but I keep getting the error Error Code 11004: Host not found

PS : I also tried changing the modes. So I tried

  • sudo chmod -R 755 /var/www
  • sudo chmod -R 754 /var/www
  • sudo chmod -R 777 /var/www

But it is still giving me the same error.

Any help guys? I have been banging my head on this for the past 2 days.

I have also referred this Digital ocean - How to set up virtual hosts in ubuntu 14.10

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If your domain “” is not registered with a registrar and pointed to your server’s public IP address you will not be able to reach it by name regardless of what you configure on the server itself. If this is just for testing you can add a hosts file entry on your local computer pointing your name to your server’s IP. This will allow this computer to browse to the domain and test your configuration.

On Windows the hosts file is in:


On Linux and OS X it is located in: