Knowledgebase: Miva Empresa VM
Miva Virtual Machine: Apache Configuration File (httpd.conf)
Posted by - NA -, Last modified by Wayne Smith on 10 June 2014 01:36 PM

Author: Quiche Jackson

Miva Empresa Virtual Machine - Global Install Mode: Installing a single instance of the Miva Virtual Machine for all sites to use on a server will require you to edit the Apache configuration file 'httpd.conf'.

Locate and edit the Apache configuration file httpd.conf

NOTE: Your server UNIX/Linux flavor may differ from the paths and or commands below so adjust the instructions accordingly if needed.
First update the locate database then locate the httpd.conf and then edit it. We will be using vi to edit this text file. Do not forget to restart apache when you are done.

$ locate -u

$ locate httpd.conf

$ vi /etc/httpd/conf/httpd.conf


# BEGIN FILE: httpd.conf

# The paths that start with /mivavm-v5.20/ assume you extracted the Miva VM distribution to a dir 'miva' from /

AddType application/x-miva-compiled    .mvc
Action  application/x-miva-compiled    /cgi-bin/mivavm

SetEnv MIVA_CONFIGURATION_FILE         /path/to/the/file/you/are/editing

# MvCONFIG_DIR_MIVA and MvCONFIG_DIR_DATA are the paths to a particular sites web and data directory
# Add the next two lines to the <VirtualHost> blocks for each site

# SetEnv MvCONFIG_DIR_MIVA             /var/www/html
# SetEnv MvCONFIG_DIR_DATA             /var/www/mivadata

# Use the following 2 directives if you plan on using ~user accounts
# SetEnv MvCONFIG_DIR_USER             public_html
# SetEnv MvCONFIG_DIR_USERDATA         mivadata

SetEnv MvCONFIG_SSL_OPENSSL            /lib/
SetEnv MvCONFIG_SSL_CRYPTO             /lib/

SetEnv MvCONFIG_DIR_CA                 /mivavm-v5.20/certs/openssl-0.9* New in v5.12 of Miva Merchant Empresa
SetEnv MvCONFIG_LIBRARY                /mivavm-v5.20/lib/config/
SetEnv MvCONFIG_DIR_BUILTIN            /mivavm-v5.20/lib/builtins

* If your UNIX distribution uses OpenSSL v0.9.x, you must change the value of HTTP_MvCONFIG_DIR_CA to end in "openssl-0.9"
* If your UNIX distribution uses OpenSSL v1.0.x, you must change the value of HTTP_MvCONFIG_DIR_CA to end in "openssl-1.0"

SetEnv MvCONFIG_COMMERCE_LinkPoint     /mivavm-v5.20/lib/commerce/
#LinkPoint (AKA FirstData Global) commerce library is distributed with with the engine (mivavm-v5.10\lib\commerce\ 

SetEnv MvCONFIG_DATABASE_mivasql       /mivavm-v5.20/lib/databases/
SetEnv MvCONFIG_DATABASE_mysql	       /mivavm-v5.20/lib/databases/ 

# NOTE: restart httpd after you edit the httpd.conf file

# END FILE: httpd.conf


Edit <VirtualHost> Tags on a shared server with multiple sites

<VirtualHost> and </VirtualHost> are used to enclose a group of directives that will apply only to a particular virtual host. As the comments in the above template state you will now need to map the location that Miva Merchant Empresa will use to store data and access the compiled scripts. If your <VirtualHost> tags are formatted a little diffrently no worries just add in the two SetEnv directives for Miva

DocumentRoot /var/www/site1/html
ErrorLog logs/
TransferLog logs/
SetEnv MvCONFIG_DIR_MIVA /var/www/site1/html
SetEnv MvCONFIG_DIR_DATA /var/www/site1/mivadata

Now that we have edited the Apache configuration file we need to reboot the Apache web server (httpd)

$ apachectl restart

Note the above command works with Apache 2.0 or greater for users of pre Apache 2.0 locate the httpd daemon and restart it directly.

Test your Miva configuration: Miva Merchant Diagnostic Application

The Miva Merchant Diagnostic Application diag6.mvc program is a very useful tool to determine the current configuration and troubleshooting problems with the current configuration. The Miva Merchant Diagnostic Application is distributed with the engine (mivavm-v5.20\tools\diagtool.mvc).

(970 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako