Author |
Message |
jimmo
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Dec 08, 2005
Posts: 107
|
Posted:
Sun Jul 23, 2006 5:43 am |
|
Hi All!
As the subject implies, I am trying to use a single code base for multiple sites. On the live servers, I cannot use symlinks, but all of the sites are served from a single development/test server where I could use symlinks. I have tried a number of different things with varying levels of success.
For security reasons, I put the real config.php above the DocumentRoot and access it with an include. So in principle, I would think that having a single document root and creating symlinks should work, but NukeSentinel barfs violently if the DocumentRoot directory is a symlink. ( OK, I'll take security over convenience.)
If I symlink individual files and directories underneath the DocumentRoot, things seem to work fine. Granted I haven't tested every single link and the functionality of every single form, so there may be something buried deep down that I am overlooking. However, so far it looks good. So no the question is whether anyone has some ideas of where I could possibly run into a wall.
Any info is greatly appreciated.
regards,
jimmo |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Sun Jul 23, 2006 3:20 pm |
|
There was a lot of discussion about doing this a while back - did you find anything in the forums? Of course, that was before NukeSentinel, I believe. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jimmo
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jul 23, 2006 11:41 pm |
|
There were a number of post on various topics related to this issue, but most were talking about a multiple sites with a single database. However, I want the opposite.
Admittedly there might have been something useful buried under a heading of "help me!!!" or "Question", but I did not find anything too useful. Primary what I found said it couldn't/shouldn't be done, there were major "problems" and so forth. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 24, 2006 10:48 am |
|
Right. That would be a little tricky. One option is to put shortcuts to the actual files on the subseqent sites for all the root files and directories except config.php, which would contain the appropriate database information.
You would have to perform updates for each database, though, if you updated modules, etc. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jimmo
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 24, 2006 1:33 pm |
|
Part of this whole thing is it ensure that the sites have the same Nuke version. The two sites that are currently live have different versions and it is problematic trying to keep them both updated. Soon, I will have fives sites and it is much easier to administer them if they all have the same version. Plus, any changes to the code I will want to be common amongst the sites. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 24, 2006 1:52 pm |
|
If they are on the same server and same account (e.g. addon domains), you can use the option I described above. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jimmo
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jul 25, 2006 1:07 am |
|
I have already created symlinks for most of the directories (themes will be different). They are all on the same server, but different accounts. If, as I mentioned, config.php is above the DocumentRoot and read via an include., as far as I can see it should not really matter that they are on different accounts. From a Apache/Linux perspective, I don't see any problems. However, my concern is how RavenNuke will react when it is live. What, if anything, problems can/will arise by using symlinks like this.
Keep in my, that this is only on the development system. On the live machine, there will be individual file for each site. However, if there is something in any of the files that is site specific, I would appreciate knowing about it now, before I spend the time working on the sites.
Thanks for your time!
Regards,
jimmo |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Jul 25, 2006 6:11 am |
|
Quote: |
Keep in my, that this is only on the development system. On the live machine, there will be individual file for each site. However, if there is something in any of the files that is site specific, I would appreciate knowing about it now, before I spend the time working on the sites.
|
Unfortunately, you are treading new ground. Have not seen this done (or mentioned here) before. Evaders is the only one who I can think of who may have done something like this, but, that is just a hopeful guess.
The best we can do is "surmise" that the only site-specific file in question is config.php because of the database login info. The only other one that you might want to be different (potentially) is .htaccess (but since this is a development server, even that might not be important). Beyond that, RavenNuke is PHP-Nuke 7.6.
Good luck! |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
evaders99
Former Moderator in Good Standing
![](modules/Forums/images/avatars/803d73f6452557b947721.jpg)
Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Sun Aug 13, 2006 8:04 am |
|
Hey
I have done this on my system. Symlinks I have not gotten to work, but changing the DocumentRoot in the Apache configurations does allow this to work.
I have pointed three sites to one code base -
http://www.swrebellion.com
http://www.swcic.net
http://evaders.swrebellion.com
And config.php determines which database is loaded to. For simplicity (and some table sharing) I use the same database and a different prefix set. Users are shared through $user_prefix ... however that does add some bugs to the forums for different things.
All and all, a very simple process. Don't forget that you may have to change the open_basedir directories for PHP. Also that the Apache user may need permissions to be set for those files.
It's another headache to get it to work in the Plesk system without it being overwritten... but that's another story to tell if you need it |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|