Re: Wordpress Multiple Blog Configuration
From: Chris Purves (chris.purves_at_gmail.com)
Date: 09/29/05
- Previous message: golfer: "Re: firefox - no print output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Sep 2005 10:38:28 +0800 To: Debian User Mailing List <debian-user@lists.debian.org>
On 20/08/05, Chris Purves <chris.purves@gmail.com> wrote:
> Hi,
>
> I just installed Wordpress and got it running. In the README.Debian
> file there's a mention that the Debian configuration can support
> multiple blogs, but no instructions as how to accomplish that.
>
> From README.Debian:
>
> >>>
>
> #### A little more about the (multiple blog) configuration
>
> The default wp-config.php searches for a (mysql) configuration filename based
> on the blog's host. This allows you to host more than one blog on a Debian
> system.
>
> <<<
>
> The little more is all there is as far as I can tell. Any help would
> be appreciated. Perhaps I would be better off with the multiuser
> edition (not presently in Debian archive)?
>
> Thanks.
Okay, I got it working. Here is what I did:
Apache2 setup:
I renamed /etc/apache2/sites-enabled/000-default to 002-default,
commented out the NameVirtualHost line and changed the <VirtualHost *>
line to <VirtualHost *:80>. I also added a line "ServerName
www.mysite.com". First few lines:
#NameVirtualHost *
<VirtualHost *:80>
ServerName www.mysite.com
ServerAlias mysite.com
ServerAdmin webmaster@localhost...
Then I added a file /etc/apache2/sites-enabled/001-wordpress (taken
from /usr/share/doc/wordpress/examples/apache.conf), containing
NameVirtualHost *:80
<VirtualHost *:80>
UseCanonicalName Off
VirtualDocumentRoot /srv/www/%0
Options All
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
Then I made sure the vhost_alias.load was included in mods-enabled.
This allowed the site to work as before at www.mysite.com (and
mysite.com), but anything of the form something.mysite.com would be
handled by the 001-wordpress file. For each blog I create a softlink
at /srv/www pointing to /usr/share/wordpress.
MySQL:
The /usr/share/doc/wordpress/examples/setup-mysql script was okay, but
it created a new database for every user. I decided that I wanted to
have only one database with different table name prefixes. What I
ended up doing was running the scipt once to create the initial
database, then deleting all the tables and and modifying the config
file created by the script.
/etc/wordpress/config-person1.mysite.com.php looks like this:
<?php
define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'ak2k3WE');
define('DB_HOST', 'localhost');
$table_prefix = 'wp_person1_';
$server = DB_HOST;
$loginsql = DB_USER;
$passsql = DB_PASSWORD;
$base = DB_NAME;
?>
When I want to add a new user I need only create a new link in
/srv/www, for example /srv/www/person2.mysite.com to point to
/usr/share/wordpress, then copy config-person1.mysite.com.php to
config-person2.mysite.com.php and change $table_prefix from
wp_person1_ to wp_person2_.
Final Considerations:
Now I have a setup that allows me to create a new blog by simply
adding a softlink and copying a file and changing a single parameter.
I don't have to restart apache or run any scripts and I don't have to
worry about an endless number of databases being created.
Problems: having one database may be a bit of a security risk and
also if the database is corrupted, it will affect all users, not just
one. This is acceptable for me, as I plan to have frequent backups of
the file.
Also, allowing uploading is a bit of a problem. I can set up each
user to point to a different place on the server to store their files,
but if they know the location of someone elses files, they could
change their settings and gain access. I don't see this as a big
problem, but it's still something I would prefer to do without.
-- Take care, eh. Chris
- Previous message: golfer: "Re: firefox - no print output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Config for OLTP system
... extrenal disks fo the 60GByte database server. ... IBM Informix Dynamic Server
Configuration Parameters ... # BUFFSIZE - OnLine no longer supports this configuration
parameter. ... (comp.databases.informix) - RE: sps Recovery ERROR:database schema is too old to perform
... Basically I was trying to use both the content and the configuration ... database
files of WSS on a virtual server "MyWSS" that used to ... "MyServer2" with the same virtual
server name... ... database server needed to be changed as well. ... (microsoft.public.sharepoint.portalserver) - Re: major security concern - any sql user with minimal permission can see code for all stored procs
... this you may well enter the realm of an unsupported configuration and that's ...
> things - and hence has enterprise manager - then this approach won't work. ... >
If you just want to lock down a database, then I'd try my approace - lock ... >>>
who needed to execute an SP on my server at his location. ... (microsoft.public.sqlserver.security) - Re: Issues with Share Point Services after removing and restoring companyweb
... 1.Please check the server configuration at ... click set configuration database
server,in the database server textbox,it ... message when you access your Windows SharePoint
Services Web site ... (microsoft.public.windows.server.sbs) - RE: WSS install locked into MSDE DB - Can not install for SQL Serv
... For the MASTER database ... Althought we change the Configuration Application
pool several times ... interface BUT they appear to be MSDE databases and not SQL Server databases.
... (microsoft.public.sharepoint.windowsservices)