www.michalscorner.com what I have recently discovered

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

  1. 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>
  2. Restart Apache to pull new config
  3. Check if it works now
  4. In case you still cannot get the page follow steps below
  5. Search for all config files that are included
    find /etc/apache2 -exec grep "Options" {} \; -print;
  6. Check all of the files listed by above command for Options setup and make sure it is set as per step 1.
  7. Restart Apache

Your apache should follow symbolic links correctly now.