Open Source Content Management Framework

Using Midgard with Plesk

  1. Setting up a Midgard database
  2. Setting up a Midgard website

Plesk is a commercial package for managing Linux-based hosting servers. It uses its own configuratio file structure that is incompatible with the way Midgard Virtual Hosts are set up with Datagard.

It is however possible to run Midgard with Plesk using a set of scripts from http://midgard.tigris.org/source/browse/midgard/src/tools/plesk/

Install the scripts to /usr/share/midgard/plesk on your server.

Setting up a Midgard database

Set up the Midgard database using the Datagard tool provided in Midgard distribution.

In addition, you must create an unified Midgard configuration file containing the main database settings. These should include at least the following:

  • Name
  • Username
  • Password
  • Blobdir

Setting up a Midgard website

Create new domains and websites using the Plesk administration tool. This will cause PSA to regenerate Apache configuration files.

Next you need to add Midgard configuration details to Apache configuration. For this, run the supplied midgardize-vhost.php script.

For example, if you have just added a website "www.example.net" into your Plesk server, you need to run the following to Midgardize it:

# php /usr/share/midgard/plesk/midgardize-vhost.php -n www.example.net

Run php /usr/share/midgard/plesk/midgardize-vhost.php -h for more options.

The midgardize-vhost.php script will do the following:

  • Generate Midgard-specific vhost.conf file for the website
  • Symlink MidCOM static files (images and CSS) under the host document root
  • Register the Midgard settings into Plesk using the websrvmng --reconfigure-vhost command

Next you can restart Apache and create the site using the Midgard Site Wizard.

Designed by Nemein, hosted by Kafit