You are not logged in.
It seems that it might be useful to do a multisite install with sites residing outside, rather than inside, the TXP directory. This would be useful in cases of hosts like Bluehost were new site setups are automated and domain root dirs are set up automatically.
Presumably, one could just recreate the symlinked files outside the TXP directory. Question: is there any other path info that would make this problematic? Is there a script out there that could make this task easier?
Thanks,
Matt
Offline
aesop1 wrote:
It seems that it might be useful to do a multisite install with sites residing outside, rather than inside, the TXP directory. This would be useful in cases of hosts like Bluehost were new site setups are automated and domain root dirs are set up automatically.
Presumably, one could just recreate the symlinked files outside the TXP directory. Question: is there any other path info that would make this problematic? Is there a script out there that could make this task easier?
Yes, for shared hosts that impose a domain directory structure (Joyent shared hosting falls into this category), you cannot use the included sites directory. Instead, you must create your own. Works fine on Joyent with no issues. I will see about whipping up a script to automate the process.
Offline
That would be very cool and I’m sure that many in the TXP community would benefit! Thanks, Sam. Be a nice script to roll into the TXP distro too.
Offline
As promised:
Offline
Sam, the script and help is much appreciated – thanks! One note for Joyent users – some of us (like me) have a site structure like /web/public/ rather than just /web.
Had a quick look at the script and first thing that came across my mind is how does one approach this is the sites already exist? In my case, I have 6 domains in operation on Joyent, all running TXP 4.2 already (except one site which is being upgraded from 4.06).
What would be a sensible way of setting up multi site support for non-clean installs?
TXP Tips | @txptips | Me | @jonathanstubbs | Github
TXP Builders – finely-crafted code, design and txp @txpbuilders
Offline
The script should not overwrite directories that already exist. The default settings are for Joyent, so it tries to create:
web/
admin/
public/
private/
If the site already exists, web/public will already be there, so the script should not overwrite it.
For upgrading existing sites, I would:
1. Rename the web directory to, for example, web.orig
2. Run the script to create a new web directory
3. Copy your static assets (images, files, etc.) from web.orig/public/ to the new web/public/
4. Copy your config.php to web/private/
Obviously, your site will be down for a short while during the transition.
Last edited by artagesw (2009-09-07 21:42:48)
Offline
Thanks Sam. Do I need to edit the script to make it web/public instead of web?
TXP Tips | @txptips | Me | @jonathanstubbs | Github
TXP Builders – finely-crafted code, design and txp @txpbuilders
Offline
jstubbs wrote:
Thanks Sam. Do I need to edit the script to make it
web/publicinstead ofweb?
No.
Offline
I’m hung up on the whole main domain vs. subdomain situation in Bluehost and not sure how to use shell commands (and also not sure if Sam’s bash script would even work for Bluehost)? Is there anyone out there who would want to help steer us Bluehosters in the right direction?
Right now my domain/site root structure (txp 4..0.x installations) is:
Textpattern site for my main domain:
/home/maindomainusername/public_html/ static asset files including index.php, .htaccess, files, images, etc.
/home/maindomainusername/public_html/textpattern/ textpattern files for my main domain site installation
The addon domain is set up the same way, just within a folder inside public_html/addondomainfolder/
Below, I am attempting to visualize what the directory would need to look like if I were to install 4.2.0:
Textpattern site for my main domain:
/home/maindomainusername/public_html/
admin/ _with setup/, theme/, txp_img/, index.php, jquery.js, textpattern.css, textpattern.js_
public/ _with admin/, files/, images/, setup/, theme/, css.php, index.php
private/ config.php
textpattern/ with all of the textpattern 4.2.0 files for use by all of the sites -- not sure if I would need to remove index.php from this folder?
css.php <- for use by all of the sites
.htaccess <- not sure if this would be used for all of the sites and/or to specially redirect to the primary domain's /public folder or something?
index.php <- not sure if this should be here or if it should be deleted?
Second Textpattern site for an addon domain:
/home/maindomainusername/public_html/addondomainfolder/
admin/ with setup, theme, txp_img, index.php, jquery.js, textpattern.css, textpattern.js
public/ with admin, files, images, setup, theme, css.php, index.php
private/ config.php
Am I close in visualizing the site directory structure? Thanks!
Last edited by photonomad (2009-09-08 23:55:48)
Offline