13

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?

EDIT:

 $ ls /etc/apache2/sites-available
 000-default.conf  default-ssl.conf
user159
  • 233

2 Answers2

16

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.

drc
  • 2,890
  • 15
  • 16
8

/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:

/etc/apache2/apache2.conf

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

wassimans
  • 339