#3973 Remove Apache sites-enabled symlinks with a different name

1.560
closed-fixed
Jamie Cameron
5
2011-08-23
2011-08-23
Anonymous
No

Under a vanilla Debian 6 installation, Apache2 has the following symlinks:

# ls -lh /etc/apache2/sites-enabled/
total 0
lrwxrwxrwx 1 root root 26 Aug 23 11:54 000-default -> ../sites-available/default

New users tend to remove the 'default' virtual host to create their own.
At that point, Webmin removes:
/etc/apache2/sites-available/default -> OK
/etc/apache2/sites-enabled/default -> doesn't exist

What happens, is there's now a dangling symlink at
/etc/apache2/sites-enabled/000-default, which _prevents_ Apache from
restarting.

At that point, if the user doesn't have root privileges to manually remove 000-default, (s)he's stuck!

Webmin could check symlinks that point to sites-available/default in addition to removing the symlink with the same name.

Discussion

  • Jamie Cameron
    Jamie Cameron
    2011-08-23

    • status: open --> closed-fixed
     
  • Jamie Cameron
    Jamie Cameron
    2011-08-23

    Thanks for pointing this out .. I will fix this in the next Webmin release.