Hi Richard,
long time no see. I've been flat out, and guess the same for you. I don't know about interpreted Miva, but for compiled, here is a bash install script I've use on Plesk 10.4 on CentOS 5.5 if that helps.
I had all the install files in the /root/ directory and then the script takes care of copying and setting permissions.
You will need to modify according to the requirements for 3.9 however hopefully it shouldn't be too different.
This has made enabling new Miva enabled domains a breeze for me.
For anyone else who's looking, the configuration might look a bit odd as it's configured to work with recent versions of empresa, but I still require the obsoleted ODBC database library which actually continues to work if you load it manually.
Code:
#!/bin/bash
# Miva Empressa setup script for Plesk 8.x
# Copyright 2009 Christopher Cookson
# Copy Miva Empressa files to user cgi-bin
echo "Enter web site (without www) to install Miva Empressa:"
read ipath
echo "Enter the FTP login name as configured in Plesk for this domain"
read wuser
if [ -n ${ipath} ]
then
echo "Copying Files..."
cp /root/mivavm/mivavm "/var/www/vhosts/"${ipath}"/cgi-bin/mivavm"
cp /root/mivavm/diag6.mvc "/var/www/vhosts/"${ipath}"/httpdocs/diag6.mvc"
cp /root/mivavm/lib/config/3x.so "/var/www/vhosts/"${ipath}"/cgi-bin/libmivaconfig.so"
cp -R /root/mivavm/lib "/var/www/vhosts/"${ipath}"/cgi-bin/lib"
cp -R /usr/share/miva/certs "/var/www/vhosts/"${ipath}"/cgi-bin/"
mkdir "/var/www/vhosts/"${ipath}"/mivadata"
chown -R $wuser "/var/www/vhosts/"${ipath}"/cgi-bin/lib"
chgrp -R psacln "/var/www/vhosts/"${ipath}"/cgi-bin/lib"
chown -R $wuser "/var/www/vhosts/"${ipath}"/cgi-bin/certs"
chgrp -R psacln "/var/www/vhosts/"${ipath}"/cgi-bin/certs"
chown apache "/var/www/vhosts/"${ipath}"/mivadata"
chgrp psacln "/var/www/vhosts/"${ipath}"/mivadata"
chmod 770 "/var/www/vhosts/"${ipath}"/mivadata"
chown $wuser "/var/www/vhosts/"${ipath}"/cgi-bin/mivavm"
chgrp psacln "/var/www/vhosts/"${ipath}"/cgi-bin/mivavm"
chown $wuser "/var/www/vhosts/"${ipath}"/httpdocs/diag6.mvc"
chgrp psacln "/var/www/vhosts/"${ipath}"/httpdocs/diag6.mvc"
chown $wuser "/var/www/vhosts/"${ipath}"/cgi-bin/libmivaconfig.so"
chgrp psacln "/var/www/vhosts/"${ipath}"/cgi-bin/libmivaconfig.so"
chmod 755 "/var/www/vhosts/"${ipath}"/cgi-bin/mivavm"
echo "Configuring..."
{ #Create mivavm.conf file with Miva Empressa configuration settings in user cgi-bin
echo "securityoptions=15"
echo "mivaroot=&[document_root]"
echo "stdmodedatadir=/var/www/vhosts/"${ipath}"/mivadata"
echo "cadir=/var/www/vhosts/"${ipath}"/cgi-bin/certs"
echo "openssl=/lib/libssl.so.6"
echo "openssl_crypto=/lib/libcrypto.so.6"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/system.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/crypto.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/file.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/math.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/string.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/time.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/archive.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/template.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/logging.so\">"
echo "<BUILTIN-LIB LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/builtins/mvlibgd.so\">"
echo "<SYSTEM-LIB CODE=\"GD\" LIBRARY=\"/usr/lib/libgd.so.2.0.0\">"
echo "<DATABASE-LIB METHOD=\"mivasql\" LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/databases/mivasql.so\">"
echo "<DATABASE-LIB METHOD=\"mysql\" LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/databases/mysql.so\">"
echo "<DATABASE-LIB METHOD=\"odbc\" LIBRARY =\"/var/www/vhosts/"${ipath}"/cgi-bin/lib/databases/odbc.so\">"
} > "/var/www/vhosts/"${ipath}"/cgi-bin/mivavm.conf"
chown $wuser "/var/www/vhosts/"${ipath}"/cgi-bin/mivavm.conf"
chgrp psacln "/var/www/vhosts/"${ipath}"/cgi-bin/mivavm.conf"
{
echo "AddType application/x-miva-compiled .mvc"
echo "Action application/x-miva-compiled /cgi-bin/mivavm"
echo "DirectoryIndex index.mvc index.php index.htm index.html"
} > "/var/www/vhosts/"${ipath}"/httpdocs/.htaccess"
chown $wuser "/var/www/vhosts/"${ipath}"/httpdocs/.htaccess"
chgrp psacln "/var/www/vhosts/"${ipath}"/httpdocs/.htaccess"
echo "Done!"
else
echo "Please provide a destination path"
fi