user2840753
user2840753

Reputation: 51

Why is /etc/apache2/sites-enabled/default returning blank?

I just installed a LAMP stack and when I ran sudo nano /etc/apache2/sites-enabled/default, it was empty, like whatever file it opened doesn't exist. Never had this problem on my last LAMP install. What's going on?

Upvotes: 1

Views: 5912

Answers (2)

user3137766
user3137766

Reputation:

Hello thank you i get also this issue, as mentionned by Brian Kintz, I did

ls -l /etc/apache2/sites-enabled

and get line like :

lrwxrwxrwx 1 root root 26 Nov 14  2013 000-default -> ../sites-available/default

I try to edit it :

 sudo nano /etc/apache2/sites-enabled/000-default

I have only virtualhost block inside this file.

Thank you

Upvotes: 0

Brian Kintz
Brian Kintz

Reputation: 1993

The files in Apache's sites-enabled directory are ordered, which means that the filenames start with a number. The default site is usually named 000-default or similar, not just default. Take a look in the directory to see what's there with ls, then edit that file with nano.

> ls -l /etc/apache2/sites-enabled

    lrwxrwxrwx 1 root root 26 Nov 14  2013 000-default -> ../sites-available/default

> sudo nano /etc/apache2/sites-enabled/000-default

Upvotes: 2

Related Questions