I have just installed apache2. My default file for "localhost" does not seem to be the file that is located in /var/www/html/index/.

To get to that file I have to type in or in mozilla.

Keep in mind that I'm very new to this so try keeping the terms fairly simple.

Thanks in advance!


The default DocumentRoot for Apache is /var/www/html/ (without the index/) since Ubuntu 14.04 and /var/www/ in older Ubuntu versions.

  • I was planning on typing index.html but I guess it slipped my mind. – S. Andersson Jan 11 '16 at 9:54

Make sure your /etc/hosts file has the following line: localhost

Your issue seems to be your system not going to when you put in localhost, as it gives you the expected results when you use but not localhost, as they should give you the same results, since localhost should point to

  • How do I get to that file and change it? – S. Andersson Jan 11 '16 at 9:54
  • sudo nano /etc/hosts – QwertyChouskie Jan 11 '16 at 18:56
  • or sudo mousepad /etc/hosts – QwertyChouskie Jan 11 '16 at 18:56
  • or sudo gedit /etc/hosts – QwertyChouskie Jan 11 '16 at 18:56
  • What should I call the file? It's just a directory. – S. Andersson Jan 11 '16 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.