Thread: Symlink

  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2008
    Rep Power

    Question Symlink

    Hope this is in the right forum.

    I have a CMS I have developed, which will run on several sites all hosted in sub directories on my dedicated server. I want to create symlinks for the main files of the CMS, including all config files, functions and admin sections. Then there will be a few files specific to each site.

    I read some tutorials on creating symlinks, although most are not very good in my opinion. Hopefully someone can answer a couple of my questions.

    Do you have to create a symlink for every file I want to include? Or can I just create a symlink to a directory? For example:

    CMS is located at /www/cms/

    Can I make www/domain1/ point to that directory, and if so, will all files include themselves correctly. I think I am a bit confused on how this works.

    Thanks in advance.
  2. #2
  3. Lazy Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Washington, USA
    Rep Power
    Yes, you can symlink whole directories. You'll get every single thing below there (files, directories, other links...) too.

    Yes. If the CMS is written intelligently you can probably just make a symlink for domain1->cms. Make sure the web server is configured to follow symbolic links (ie, Apache may need the FollowSymLinks option enabled).

IMN logo majestic logo threadwatch logo seochat tools logo