Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: fixit on April 14, 2007, 08:26:39 AM
-
METADOT HOWTO available in the SME WIKI http://wiki.contribs.org/Metadot
Russell
-
I have missed metadot! Thank You Russel!
Script, How To, worked flawlessly!
Ed
-
Hi Russell.
I found a little bug in the howto.
Suppose you have a domain (yourdomain.com) and this domain utilizes your primary (or any) ibay to host your files for the webpage. What happens if your webpage has a directory named "images"?
This images directory are aliased to /opt/metadot and not to the correct location /home/e-smith/files/ibays/Primary/html/images/.
When I test various configurations with metadot I found this bug, because my primary site images are lost!!!
To fix this, I tried some configurations, but the most easy is to remove the images alias in the 87metadot file, and into metadot configuration, under: manage->config->System params->Modify->Images directory location
change /images to /metadot/images. Then move the /images dir from /opt/metadot/ to /opt/metadot/metadot/
Always make sure you never have a directorys under ibays named "js" "public" "private" "skins" "htmlarea3"
-
HiRussell again
I test some configurations, and some alias are not necesary. Please test.
Alias: /images/ - /index.pl - /htmlarea3/ - /userchannel.pl
Finally my 87metadot file look like this:
Alias /metadot /opt/metadot/metadot
Alias /js/ /opt/metadot/js/
Alias /public/ /opt/metadot/sitedata/public/
Alias /skins/ /opt/metadot/sitedata/skins/
Alias /private/ /opt/metadot/sitedata/private/
<Directory /opt/metadot>
Options +Indexes +Includes +FollowSymLinks -MultiViews +ExecCGI
AllowOverride All
allow from all
Satisfy all
AddHandler cgi-script .pl
PerlHandler speedy::Registry
PerlSendHeader On
DirectoryIndex index.pl
</Directory>
-
I am aware of this problem and I am unsure how to solve this 100%, There is documentation in relation to virtual host as well as the file metadot.conf.linux.vserver_ex located in /opt/metadot/etc that needs to be modified
Configuration for virtual host
Other configuration that needs to be done, is to edit the sql files /opt/domain2/default_data
createdbanduser4x.sql and sampledata.sql
Edit createdbanduser4x.sql and rename to domain2dbuser4x.sql
edit line 3 create database metadotdb; and change to create database domain2db;
Example
insert into user values ('localhost','metadotvh',password('changeme'),'Y','Y','Y','Y','Y','Y','N','N','N','N','N','N','N','Y','N','N','Y','Y','Y','N','N','N','N','N','N', 0, 0, 0);
flush privileges;
create database domain2db;
Edit sampledata.sql and rename to domain2data.sql
edit line 3 and change Database: metadotdb to domain2db
Example
-- MySQL dump 9.11
--
-- Host: localhost Database: domain2db
-- ------------------------------------------------------
-- Server version 4.0.23_Debian-3ubuntu2-log
The new Database setup instruction will now be
mysql -uroot mysql < domain2dbuser4x.sql
mysql -e "grant all privileges on domain2db.* to metadot@localhost identified by 'yourpassword'"
mysql -e "flush privileges"
mysql -umetadot -pyourpassword domain2db < domain2data.sql
Example of the Templates that I have got to work so far, with domain 2 I used Alias domain1.com /opt/domain1/metadot
Domain 1
============================================
#Metadot
ServerName domain.com
DocumentRoot /opt/metadot/metadot
Alias /metadot /opt/metadot/metadot
Alias /images/ /opt/metadot/images/
Alias /js/ /opt/metadot/js/
Alias /index.pl /opt/metadot/metadot/index.pl
Alias /public/ /opt/metadot/sitedata/public/
Alias /skins/ /opt/metadot/sitedata/skins/
Alias /htmlarea3/ /opt/metadot/js/htmlarea3/
Alias /private/ /opt/metadot/sitedata/private/
Alias /userchannel.pl /opt/metadot/metadot/userchannel.pl
<Directory /opt/metadot>
Options +Indexes +Includes +FollowSymLinks -MultiViews +ExecCGI
AllowOverride All
allow from all
AddHandler cgi-script .pl
PerlHandler speedy::Registry
PerlSendHeader On
DirectoryIndex index.pl
</Directory>
Domain 2
========================
#Metadot
ServerName www.domain2.com
DocumentRoot /opt/domain2/metadot
Alias domain1.com /opt/domain2/metadot
Alias /images/ /opt/domain2/images/
Alias /js/ /opt/domain2/js/
Alias /sitedata/ /opt/domain2/sitedata/
Alias /public/ /opt/domain2/sitedata/public/
Alias /sitedata/skins/ /opt/domain2/sitedata/skins/
Alias /htmlarea3/ /opt/domain2/js/htmlarea3/
Alias /sitedata/private/ /opt/domain2/sitedata/private/
Alias domain2.com/userchannel.pl /opt/domain2/metadot/userchannel.pl
<Directory /opt/domain2>
Options +Indexes +Includes +FollowSymLinks -MultiViews +ExecCGI
AllowOverride All
allow from all
AddHandler cgi-script .pl
PerlHandler speedy::Registry
PerlSendHeader On
DirectoryIndex index.pl
</Directory>
metadot.conf.linux.vserver_ex this file needs to be renamed to metadot.conf and the correct location added to the public uploads and skins directories
[metadot1]
name = dbi:mysql:metadotdb
user = metadot
pass = xxx
dbtype = MySQL
public_uploads_dir = /home/metadot/metadot/sitedata/yyy.aaa.com/public
public_uploads_location = /public
jsform_type = Chain
jsform_filter = Checker|Dialog|Focus
controller_type = Metadot::MetadotController
skin_template_dir = /home/metadot/metadot/sitedata/yyy.aaa.com/skins
servers = <<SERVERS
localhost
yyy.aaa.com
SERVERS
[metadot2]
name = dbi:mysql:metadotdb_alt
user = metadot
pass = xxx
dbtype = MySQL
public_uploads_dir = /home/metadot/metadot/sitedata/zzz.aaa.com/public
public_uploads_location = /public
jsform_type = Chain
jsform_filter = Checker|Dialog|Focus
controller_type = Metadot::MetadotController
skin_template_dir = /home/metadot/metadot/sitedata/zzz.aaa.com/skins
servers = <<SERVERS
zzz.aaa.com
NNN.NNN.NN.NNN
SERVERS
-
HiRussell again
I test some configurations, and some alias are not necesary. Please test.
Alias: /images/ - /index.pl - /htmlarea3/ - /userchannel.pl
Finally my 87metadot file look like this:
Alias /metadot /opt/metadot/metadot
Alias /js/ /opt/metadot/js/
Alias /public/ /opt/metadot/sitedata/public/
Alias /skins/ /opt/metadot/sitedata/skins/
Alias /private/ /opt/metadot/sitedata/private/
<Directory /opt/metadot>
Options +Indexes +Includes +FollowSymLinks -MultiViews +ExecCGI
AllowOverride All
allow from all
Satisfy all
AddHandler cgi-script .pl
PerlHandler speedy::Registry
PerlSendHeader On
DirectoryIndex index.pl
</Directory>
The reason why I changed my fragement to this way is so that I could remove metadot from the url
Example www.mydomain.com/metadot
The other problem I am facing now is seperating these directories
/images /skins and /private
is there a way for each domain to point to their own image directories, such as
domain1.com/images points to /opt/domain1/images
and
domain2.com points to /opt/domains2/images
-
The reason why I changed my fragement to this way is so that I could remove metadot from the url
Example www.mydomain.com/metadot
The other problem I am facing now is seperating these directories
/images /skins and /private
is there a way for each domain to point to their own image directories, such as
domain1.com/images points to /opt/domain1/images
and
domain2.com points to /opt/domains2/images
Ok, I now understand.
The images directory is not necesary to alised to diferent domains because are the system images, not the public or private images.
I suspect to fix with the "location" apache directive.