Blue Reef Technical Support ResellersAbout Blue Reef Consulting, Inc.

Return to Blue Reef Virtual Servers Home Page
Order virtual servers, software, computers, and more!
Return to Blue Reef Main Home Page
Site Map
Support Solutions to help you do business with your Virtual Server.

Virtual Servers Home Page
Virtual Server Support
Virtual Server Addons
Web Site Development Suites
Web Site Development Suites Overview
Active Server Pages
Java OverviewJava Overview
Java Servlets and Java Server Pages (JSP)Java Servlets and Java Server Pages (JSP)
Java LibraryJava Library
Miva Overview
Configuring Miva for Subhosts
PHP  Overview
Installing PHP 3Installing PHP 3
Installing PHPInstalling PHP 4
Perl  OverviewPerl  Overview
Perl Module InstallationPerl Module Installation
Request help using our Problem Tracking System
Order a Blue Reef Virtual Server now!

Configuring Miva for Subhosts

To provide Virtual Subhost with Miva support, we recommend that you use Miva's <VirtualHost> configuration directive in the miva.conf file.
  1. Be sure that the following parameters are set in miva.conf:


    NOTE: If you choose to set virtualhostvariable=HTTP_HOST, then your miva.conf must have a <VirtualHost> directive for each of the virtual subhost's domain names. For example, using 'HTTP_HOST' will require both and to have its own <VirtualHost> directive in miva.conf. This is why we recommend using 'SERVER_NAME' instead, because in your httpd.conf, you can consolidate a virtual subhost's multiple host names under a single <VirtualHost> directive with just one ServerName. This is documented in the instructions below.

  2. Add the <VirtualHost> directive to miva.conf. Assuming that you are using virtualhostvariable=SERVER_NAME in miva.conf, the name of the <VirtualHost> should equal the ServerName for the subhost defined in the <VirtualHost> directive for your web server in your httpd.conf file.

    Ideally, the mivaroot parameter should equal the virtual subhost's DocumentRoot (another parameter of the <VirtualHost> directive in httpd.conf).

    The stdmodedatadir should be outside of the ~/www/htdocs directory, unaccessable by others, since all data collected by Miva will be stored in that directory.

    The VirtualHost directive in miva.confshould look something like this:

      mivaroot=/usr/local/etc/httpd/htdocs/SUBHOST-DOMAIN-DIR stdmodedatadir=/usr/local/etc/httpd/miva/SUBHOST-DOMAIN-DIR_data

  3. You may or may not need to modify your web server configuration file, httpd.conf, depending on the method you are using to give your virtual subhost's CGI support. After ensuring that the parameters defined in the <VirtualHost> directive in httpd.conf matches those you set in the <VirtualHost> directive of miva.conf, you must check if your subhost has access to the Miva engine that was put in your ~/www/cgi-bin during the Miva installation.

    If the virtual subhost is sharing your virtual server's primary cgi-bin directory--meaning that you have not explicitly identified an alternate ScriptAlias for the subhost in the <VirtualHost> directive of httpd.conf--then after following all the instructions above, Miva should be setup and ready to support your virtual subhost. If you don't understand what a ScriptAlias is, then your virtual subhost is probably using your primary cgi-bin directory and the Miva engine therein, so you don't have to worry about making anymore changes. Go on to the next step.

    However, if the virtual subhost has its own cgi-bin directory, then we would recommend that you give that virtual subhost access to the Miva engine in your primary cgi-bin directory by adding the following to your httpd.conf's <VirtualHost> directive:

      ScriptAlias /cgi-miva/ /usr/local/etc/httpd/cgi-bin/
      AddType application/x-httpd-Miva .mv
      Action application/x-httpd-Miva /cgi-miva/miva
    NOTE: If Miva still has problems running an application for a virtual subhost, or runs the application but stores data in the wrong directory, then delete all the files in your workdir (the default installation will have this set as ~/www/miva/workdir). This directory contains a caching database with virtual subhost configuration information. Deleting the database files will require Miva to reload the new VirtualHost information from miva.conf.

About Miva

Database Solutions

CGI Scriptorium

Server Add-ons


Official Miva Web-Scripting Book
Official Miva Web-Scripting Book:
Shopping Carts, Feedback Forms, Guestbooks, and More logo
Search for :
Enter keywords...