Miva, Miva Script, Miva Empresa, Miva Mia amd Miva Merchant are registered trademarks of the Miva Corporation
 
Ivo Truxa - truXoft control systems: advanced programming and custom IT solutions home / about / webdesign / Miva / automation / contact

http://mivo.truxoft.com
MIVO!
miva beyond limits

 

MIVA®  RESOURCES: Miva Configuration Tips

by Ivo Truxa, 02/24/2000

Miva users often do not know that they can easily change their Miva configuration. If your IHP (Internet Host Provider) uses the CGI Standard-Mode Miva installation, the configuration file is by default in the /etc directory. Most probably you do not have access to the file, but with a simple operation you can get your own configuration file.

Note: read the Mivo-patch article if you need to keep your CGI-style URLs unchanged!

All you need to do is to rename the Miva binary - it is mostly the 'miva' file in your cgi-bin directory. For example:
rename miva to mivo
and create mivo.conf in the same directory (cgi-bin)

Now, you just need to put some parameters into:

htmlscriptdefault=index.mv
redirectonly=yes
validextensions=.mv,.hts
globaltimeout=90
mailtimeout=20
calltimeout=60
usecookies=no
htmlscriptroot=/absolute_path_to_your_script_dir
stdmodedatadir=/absolute_path_to_your_data_dir        
sitevars=/absolute_path_to_your_sitevars_file
logfile=/absolute_path_to_your_log_file
loglevel=0

Better though, is viewing the original common miva.conf and copying the original parameters - the common ones and the ones from your VirtualServer section. Usually (if your account is not "chrooted") you will be able to view them either through FTP or Shell (telnet/SSH) in /etc/miva.conf. In a shell session you would type:
more /etc/miva.conf
to see the content of the file

If you use the CGI-style URLs, set the redirectonly parameter to 'no' but DO keep the validextensions parameter! Removing both parameters would cause a serious security vulnerability!

For security reasons, the stdmodedatadir, sitevars and logfile parameters should be stored out of your public space (off the Web)!

You can create several instances of Miva, each with its own parameters. For example: with cookies, without them, short timeout, long timeout, etc. You just copy the binary and configuration file with another name.

You can also define different settings for running from cron. Cron mostly acts as localhost (IP 127.0.0.1) and in your configuration file you can use individual setting for each of your VirtualHosts:

<VirtualHost 127.0.0.1>
globaltimeout=150
mailtimeout=60
</VirtualHost>

<VirtualHost your_domain_1>
validextensions=.mv,.html
globaltimeout=40
mailtimeout=10
usecookies=yes
htmlscriptroot=/absolute_path_to_another_script_dir
stdmodedatadir=/absolute_path_to_another_data_dir        
sitevars=/absolute_path_to_anither_sitevars_file
</VirtualHost>

<VirtualHost your_domain_2>
htmlscriptroot=/absolute_path_to_another_script_dir
...
</VirtualHost>

Read more details on Miva configuration at Miva Empresa Admin Manual

Another possibility is to have several different Miva instances and associate them with specific document extensions in a .htaccess file. You can use different .htaccess file with different associations in each subdirectory.

Example of .htaccess file:

AddType application/x-httpd-Miva mv
AddType application/x-httpd-Mivo mva
Action application/x-httpd-Miva /cgi-bin/miva 
Action application/x-httpd-Mivo /cgi-bin/mivo

If you use Apache server, get more details on possibilities of .htacces configuration file in the Apache documentation


top

   

Miva and some other terms used on this page are registerd trademarks of the Miva Corporation
copyright  truXoft  © 1997-2009