I followed the instruction here to configure a PHP development environment. First:

sudo tasksel install lamp-server

It succeeded, and It works! is outputted in http://localhost/. Then:

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite

An error happened here:

cp: cannot stat ‘/etc/apache2/sites-available/default’: No such file or directory

I'm using Ubuntu 13.10. I searched the web but didn't get anything that looked promising. Can anyone point me in the right direction?


 $ ls /etc/apache2/sites-available
 000-default.conf  default-ssl.conf
  • Please post the output of: ls /etc/apache2/sites-available – Evenbit GmbH Dec 5 '13 at 8:40

The tutorial you are using is based on an older version of Ubuntu.

13.10 ships a newer apache configuration, where the file you are looking for is named /etc/apache2/sites-available/000-default.conf.

Note the .conf at the end, which is now required for apache to pick up on the files. So make sure the config you are creating for your site also has .conf as its extension.

  • Thanks. BTW, I did't find <Directory /var/www/> in this file. Does that mean I don't need to change the Directory directive? – user159 Dec 5 '13 at 10:07
  • I think some of the defaults must've changed because now the file seems to not include as much stuff. My guess is that you can add in your customizations as usual in 000-default.conf, just make sure you nest it properly, see line "DocumentRoot /var/www" which should be somewhere near line 12 in the default (stock/unmodified) one. – osirisgothra Feb 8 '14 at 9:06

/etc/apache2/sites-available/000-default.conf is the configuration file for the default site, only. You can add as many sites as you want, with their config files located in this same directory.

The apache global configuration file you're looking for is located in:


As @drc mentioned, a lot of things changed in recent versions of Ubuntu.

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.