-
Posted on January 29th, 2009 3 comments
Part I: About SourceForge.net
SourceForge.net is a great platform for Open Source Programmers to host and share their work with the rest of the world. SourceForge provides developers with server space, CVS services, file mirroring services and logging of project related data. It also provides web hosting service to the projects hosted by SourceForge.
The public folder on the server space provided by SourceForge is non-writable by the website, which often confuses developers and dissuades them from installing complex websites, built upon systems such as Drupal & Joomla!. However, a little understanding of the hosting system ensures that you can freely install any system on the hosting server, provided you abide by the conditions laid down by SourceForge.
Part II: Folder Structure
Every project hosted by SourceForge is provided with a hosting space, located at /home/groups/P/PR/PROJECTNAME/. As an example, the hosting space for the project filezilla would be something like /home/groups/f/fi/filezilla/. You would see two sub-folders in your hosting space: htdocs and persistent. Your project server is publicly accessible at: http://PROJECTNAME.sourceforge.net.
Everything inside the folder htdocs is visible to the visitors of your website. However, a script under the folder htdocs cannot write to another file under this folder. Instead, the file must be located in the folder persistent (mentioned above). The linking between the two folders is done using “symbolic links“, as explained in the next section.
Part III: UNIX & Symbolic Links
A symbolic link under Unix is similar to a “shortcut” under Windows. It points to the location of the actual file. The syntax of the command goes like this:
$ ln -s [path to file]
Example: You have a file called configuration.php under the htdocs folder, and you need to dynamically write data to this file. As you cannot directly write to this file, you would need to move the file to the persistent folder and then create a link to that file in the htdocs folder. The following would be a set of commands that you would execute under the shell to perform this operation:
$ mv configuration.php /home/groups/P/PR/PROJECTNAME/persistent/configuration.php
$ chmod 0777 /home/groups/P/PR/PROJECTNAME/persistent/configuration.php
$ ln -s /home/groups/P/PR/PROJECTNAME/persistent/configuration.phpNow, whenever a script (on the web server) calls configuration.php to write data, the data is actually written to the configuration.php file in the persistent folder, which is not publicly accessible.
3 responses to to “Understanding SourceForge.net Hosting”
-
Anonymous February 1st, 2009 at 09:42
Thanks
That help me in setting up the website. -
Anonymous February 1st, 2009 at 09:42
Just wondering
-
Very good! Thanks
Leave a reply
-



