Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-05-16 17:28:10
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Support multiple sites (r3189)
Sounds great!
How does this work and how do i activate it?
Offline
Re: Support multiple sites (r3189)
Sam Weiss aka artagesw posted the original patch to the txp-dev mailing list. The change set is based upon his patch, and his instructions there still hold water.
We will probably provide a TextBook page once this feature has stabilized. Currently, we are still waiting for feedback from the testers.
Offline
Re: Support multiple sites (r3189)
How do you access this information? It says you need an password!
~ Cameron
Offline
Re: Support multiple sites (r3189)
By subscribing to the txp-dev mailing list.
Offline
Re: Support multiple sites (r3189)
I’ve looked around, but can’t find the information regarding how to use the multiple site feature. So for example, say I want to do this:
http://admin.domain.com/ is the TXP folder! and then have the sites at various locations such as http://blog.domain.com/ and http://www.domain.com/
~ Cameron
Offline
Re: Support multiple sites (r3189)
I’m not sure if this will help you but here is the readme Sam Weiss originally wrote including later updates from wet. As far as I can tell, Wet just marked where it is no longer necessary to apply the patch (as now in core) and changed some paths to reflect the new admin setup. This applies only to 4.09 svn version.
You might want to ask Sam Weiss if you can’t make head or tail of it.
PS: if sam or the devs would rather I remove this, I will.
textpattern-multi-site-patch
Version 4.0.8-dev (r3193)
Author: Sam Weiss (***@***.***)
==================================
Contents of Directory
=====================
This directory contains a patch file to be applied against Textpattern v.4.0.7,
as well as a web root layout template to be used for creating a Textpattern-driven web site
that is compatible with the multi-site capabilities enabled by the patch.
Files:
-- readme.txt: this file
(obsoleted by core code) -- txp_multi_site_patch_4_0_7.txt: the multi-site patch file
-- txp_site_template.tar.bz2: template for creating web root directory
Overview
========
The textpattern-multi-site-patch patch enables two main capabilities:
1. The creation of multiple Textpattern-driven web sites from a single installation
of the Textpattern core code base.
2. The ability to separate the Textpattern admin area from the Textpattern-driven
web site by placing it into its own web root and subdomain.
In addition, a modicum of extra security is achived because the vast majority of the
Textpattern core code is removed from the web document root.
As an added bonus, the admin area can be protected by SSL quite easily, since it exists
in a separate subdomain.
For example, after applying this patch, you might have the following Textpattern-driven sites,
all running off a single shared installation of the Textpattern code:
http://www.mysite1.com
https://admin.mysite1.com
http://www.mysite2.com
https://admin.mysite2.com
http://www.mysite3.com
https://admin.mysite3.com
Installation
============
Follow the steps below to apply and use the patch.
1. Install Textpattern into shared location outside of web document root. All commands will assume /usr/local/share/textpattern/.
# Substitute the path to your shared Textpattern installation for "/usr/local/share/textpattern/".
$ mkdir /usr/local/share/textpattern/
$ tar xzf textpattern-4.0.7.tar.gz -C /usr/local/share/textpattern/
2. Create symlink to current version of Textpattern.
# Substitute the path to your shared Textpattern installation for "/usr/local/share/textpattern/".
$ ln -s textpattern-4.0.7 /usr/local/share/textpattern/textpattern
(obsoleted by core code) 3. Apply multi-site patch.
# Substitute the path to your shared Textpattern installation for "/usr/local/share/textpattern/".
$ cd /usr/local/share/textpattern/textpattern
$ patch -p1 < /path/to/txp_multi_site_patch_4_0_7.txt
4. Extract directory template to web document root and rename it.
$ tar xjf txp_site_template.tar.bz2 -C /path/to/my/textpattern/sites/
$ mv /path/to/my/textpattern/sites/txp_site_template /path/to/my/textpattern/sites/mysite.com
5. (Optional) Configure your web server to create separate subdomains and web roots for web site vs. Textpattern admin area.
# You may also wish to activate SSL on the admin subdomain. For example:
# https://admin.mysite.com -> /path/to/my/textpattern/sites/mysite.com/admin
# http://www.mysite.com -> /path/to/my/textpattern/sites/mysite.com/public
6. Update path in admin/setup/index.php to match location of Textpattern installation.
# If you installed into /usr/local/share/textpattern/ per step 1, then skip this step and proceed to step 8.
# Open /path/to/my/textpattern/sites/mysite.com/admin/setup/index.php in a text editor.
# Edit line 13 to reflect the location where you installed Textpattern.
# Important! You want the full path to the internal "textpattern" folder (inside the main textpattern directory).
7. Update symlinks in admin/ directory.
# If you installed into /usr/local/share/textpattern/ per step 1, then skip this step and proceed to step 8.
$ rm /path/to/my/textpattern/sites/mysite.com/admin/{jquery.js,theme,textpattern.js,txp_img}
# Substitute the path to your shared Textpattern installation for "/usr/local/share/textpattern/".
$ ln -s /usr/local/share/textpattern/textpattern/textpattern/jquery.js /path/to/my/textpattern/sites/mysite.com/admin/
$ ln -s /usr/local/share/textpattern/textpattern/textpattern/theme /path/to/my/textpattern/sites/mysite.com/admin/
$ ln -s /usr/local/share/textpattern/textpattern/textpattern/textpattern.js /path/to/my/textpattern/sites/mysite.com/admin/
$ ln -s /usr/local/share/textpattern/textpattern/textpattern/txp_img /path/to/my/textpattern/sites/mysite.com/admin/
8. Point your web browser to your admin setup directory and proceed through setup.
# https://admin.mysite.com/setup/
# On MySQL setup page, be sure to enter the correct URL to your Textpattern site (not the admin site).
# When you create your config.php file, add the following line just before the closing curly brace:
define('txpath', $txpcfg['txpath']);
9. Log in!
# Note: The "Welcome to Your Site!" article contains hard-coded links that assume the admin area is at /textpattern.
# These links will be broken because we have moved the admin area to its own subdomain. This is expected.
10. Repeat steps 4-8 for each new Textpattern site you want to create. Your site directory layout will look like the following:
my-web-root/
mysite1.com/
admin/
private/
public/
mysite2.com/
admin/
private/
public/
mysite3.com/
admin/
private/
public/
TXP Builders – finely-crafted code, design and txp
Offline
Re: Support multiple sites (r3189)
Yep, one day I’m going to get up early, purify myself, put on my plate-mail and boldly try this sucker out. Till then, I’ll cower in the corner.
Offline
Re: Support multiple sites (r3189)
My original patch (and the code in 4.0.9) simply eliminates certain internal limitations and assumptions in the core code that prohibit a multi-site installation. As several folks have discovered, that alone does not make deploying a multi-site installation a one-click affair.
Building a UI for managing multiple installations, whether in the core or as a plugin, would be a logical next step once 4.0.9 is in place. I have not fully thought through whether or not this could be accomplished via a plugin alone.
Also, careful consideration must be given to any changes made to the layout of the installation directory, so as not to break existing single-site installations that upgrade to a multi-site enabled version of Textpattern.
I am certainly willing to take this feature to the next level if the demand is there and wet is willing to incorporate my work.
Offline
Re: Support multiple sites (r3189)
artagesw wrote:
My original patch (and the code in 4.0.9) simply eliminates certain internal limitations and assumptions in the core code that prohibit a multi-site installation. As several folks have discovered, that alone does not make deploying a multi-site installation a one-click affair.
Building a UI for managing multiple installations, whether in the core or as a plugin, would be a logical next step once 4.0.9 is in place. I have not fully thought through whether or not this could be accomplished via a plugin alone.
Also, careful consideration must be given to any changes made to the layout of the installation directory, so as not to break existing single-site installations that upgrade to a multi-site enabled version of Textpattern.
I am certainly willing to take this feature to the next level if the demand is there and wet is willing to incorporate my work.
Well the demand is certainly there for me. And I can guess many more will want such a feature. However this needs to be implemented as lightweight as possible, lightweight enough that it should be invisable should someone not be needing it, but easily accessible should someone want to use it. With that I think that the major elements should be part of the core that allow said functionality, but the management side of things should be a plugin that say adds a new menu for the admin section called sites perhaps?
Last edited by driz (2009-06-05 12:36:43)
~ Cameron
Offline
Re: Support multiple sites (r3189)
not to be a lazy ass, but…
I’d definitely use one install for multiple sites if it were just a bit easier to setup.
Offline
#11 2009-06-06 06:47:03
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Re: Support multiple sites (r3189)
This multiple sites setup seems to be for people who are server admins and have TXP on many different accounts.
It would be good to also have a solution that works more like EE where to just copy the index.php and path.php file and change a few settings in the path file. Also an interface for quick switching between sites.
Offline
Re: Support multiple sites (r3189)
FireFusion wrote:
This multiple sites setup seems to be for people who are server admins and have TXP on many different accounts.
Nope. It just requires the capability to establish symbolic links, and it even works on Windows servers with a few amendments.
It would be good to also have a solution that works more like EE where to just copy the index.php and path.php file and change a few settings in the path file.
This is how it works, basically. s/path.php/config.php/
Offline