12Apr/120
how to create hard link to a directory
hard links are allowed only to point to file however there is a workaround for this by mounting directory onto another directory which can be substitute to a hard link
mount --bind /path/to/source/directory /path/to/destination/directory
note, opposite to linking mount command requires destination directory to be created beforehand and only superuser is allowed to do it
5Jun/090
apache does not follow symbolic links
Today I have spent some time trying to fix my apache on SuSe where it could not read the content form SymLink. If you are facing the same problem follow few advises below to resolve it
- Make sure your virtual host configuration file have appropriate <Directory> tag configuration
<Directory "<your document root path>" >
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory> - Restart Apache to pull new config
- Check if it works now
- In case you still cannot get the page follow steps below
- Search for all config files that are included
find /etc/apache2 -exec grep "Options" {} \; -print; - Check all of the files listed by above command for Options setup and make sure it is set as per step 1.
- Restart Apache
Your apache should follow symbolic links correctly now.