Thread: Symlink

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

    Join Date
    Apr 2008
    Posts
    369
    Rep Power
    55

    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. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,749
    Rep Power
    9397
    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