Every article I find about web servers suggest creating a sites-available and sites-enabled directory within apache/nginx/etc. Then, using symbolic (soft) links, create a link from the available to the enabled folder.Why use symbolic links rather than hardlinks? With hardlinks, you can move the original file (rename it) as needed without needing to recreate the link. You can still delete the sites-enabled file without ruining anything, and the user/group permissions in any sane setup will be the same for both folders.Can I safely use hardlinks instead of softlinks? Or is there a downside to hardlinks I'm not seeing? The major upside for me is not having to worry about recreating a symlink if I move/rename the original file.
Should I use hardlinks for my sites-enabled folder instead of softlinks?
filesystems;symlink;webserver;hard link
I don't see any advantage to hard links.With hardlinks, you can move the original file (rename it) as needed without needing to recreate the link.That strikes me as a bug rather than a feature. If you want to disable a site (for example because you've just noticed that it has a major security hole), with symbolic links, you can just rename the sites-available entry. With hard links, and with potentially differing names, you have to hunt for the corresponding entry in sites-enabled.If you want to rename a site, do it in both directories. Otherwise it gets confusing.You can still delete the sites-enabled file without ruining anything,True with either scheme.and the user/group permissions in any sane setup will be the same for both folders.With symbolic links, you don't have to worry about ownership or permissions in the sites-enabled directory.