3

I am new to website setups, never used a web server before this recent little while. I am stumped by this basic step, though; I cannot stop a working site with the a2dissite command:

$ sudo a2dissite [such]
ERROR: Site [such] does not exist!

There is no typo possible as I get the same results by using wildcards. Actually, using the * wildcard with chosen letters returns a full sentence: ERROR: Site [the_full_name_such] does not exist!

Could my sites-* folders be somehow corrupted, or a conf file?

What are good troubledshooting steps?

1
  • How do you named the conf-file?
    – ssd_rider
    Jul 8, 2015 at 6:26

2 Answers 2

2

The following is the report of significant progresses made regarding my problem.

First troubleshooting step taken was: take time to read the code of the a2dissite script found in /usr/sbin. Realize that I usually troubleshoot well by modifying code.

Second troubleshooting step: make a copy with a diffrent name, and execute for testing purposes. Repeat the problem: FAIL. Call with perl: FAIL. Give up on echoing info from the script.

Third troubleshooting step: call man a2dissite and docuread. The interesting bit says:

   FILES

   /etc/apache2/sites-available
          Directory with files giving information on available sites.

   /etc/apache2/sites-enabled
          Directory with links to the files in sites-available for enabled
          sites.

I then see that I have a true file in sites-enabled and no 'corresponding' file in sites-available. The lack of file in sites-available was the reason for the error message.

The following apparently fixed my problematic symptoms:

/etc/apache2/sites-enabled $ sudo mv [such_site.conf] ../sites-available/[such_site.conf]
/etc/apache2/sites-enabled $ sudo ln ../sites-available/[such_site.conf] [such_site.conf]
/etc/apache2/sites-enabled $ sudo a2dissite [such_site]
ERROR: /etc/apache2/sites-enabled/[such_site.conf] is not a symbolic link, not deleting
Site [such_site] disabled.
/etc/apache2/sites-enabled $ sudo rm [such_site.conf]
/etc/apache2/sites-enabled $ sudo a2dissite [such_site]
Site [such_site] already disabled
0

Small correction in the above answer.

While you create links please create symbolic link instead of hard links.

Soft link to a file (-s).

sudo ln -s ../sites-available/[such_site.conf] [such_site.conf]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .