Announcement

Collapse
No announcement yet.

Trying to get miva empresa 3.9x working on Plesk/CentOS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to get miva empresa 3.9x working on Plesk/CentOS

    I am giving my Kloxo server the boot and setting up a server running CentOS 6/ Plesk 10.4
    I have a couple of sites left running Interpreted miva and haven't managed to get Empresa working.

    So far I have the miva binary and conf installed in /var/www/vhosts/[sitename]/cgi-bin and I have symlinked to the cgi-bin from the httpdocs directory.

    I have apache directives:
    DirectoryIndex index.php index.mv index.html
    AddType application/x-miva .mv
    Action application/x-miva /var/www/vhosts/[sitename]/cgi-bin/miva

    in /var/www/vhosts/[sitename]/conf/vhost.inc (as per the notes in the plesk-generated include which is there)

    Judging from the results that I am getting (http://sitename/ shows the apache default page, http://sitename/index.mv ouptuts raw mivascript) the server is not seeing that config file. Of course the hosting company won't support any of this.

    Has anyone been there/done that?

    Richard
    Richard Grevers
    Dramatic Design
    New Plymouth, New Zealand

    #2
    Re: Trying to get miva empresa 3.9x working on Plesk/CentOS

    Dear Richard,

    If you put Miva Script Directives in httpd.conf, did you remember to Reboot Apache (I ask as I have forgot to Reboot Apache myself in the past after making changes).
    Thank You,

    Nerd Boy

    http://www.nerdboyinc.com

    1-855-Nerd-Boy

    Comment


      #3
      Re: Trying to get miva empresa 3.9x working on Plesk/CentOS

      I remembered to reload it (service httpd reload) which is usually sufficient.

      I just included that well known apache directive 'booyah' ;-) which failed to cause a 500 error, so I'd say it's a fair chance that apache isn't reading the file. Maybe I had better ask on a plesk forum instead.
      Richard Grevers
      Dramatic Design
      New Plymouth, New Zealand

      Comment


        #4
        Re: Trying to get miva empresa 3.9x working on Plesk/CentOS

        Dear Richard,

        I know in a most Control Panel type set ups you cannot make direct changes to the httpd.conf file. You have to make them in some other file(s) and those files are then used to build the actual httpd.conf and other supporting files and such.

        Since I do not use Plesk, my guess is you need to find what files you need to place the Miva Directives in, then cause a Rebuild of the httpd.conf file.
        Thank You,

        Nerd Boy

        http://www.nerdboyinc.com

        1-855-Nerd-Boy

        Comment


          #5
          Re: Trying to get miva empresa 3.9x working on Plesk/CentOS

          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
          Christopher Cookson
          Create IT Powered by Webpression CMS

          Comment


            #6
            Re: Trying to get miva empresa 3.9x working on Plesk/CentOS

            I solved this by putting the AddType and Action directives into a .htaccess file. However, since this server has .htaccess really locked down (AllowOverrides = off, Option not allowed) I had to put the DirectoryIndex directive in a global file in /etc/httpd/conf.d
            Then, once I had fixed permissions (755 on miva.conf as well as the miva binary) we were away laughing.
            Richard Grevers
            Dramatic Design
            New Plymouth, New Zealand

            Comment

            Working...
            X