Miva Support Tech Note #2 Renaming Files/Aliases To Avoid Compatibility Problems February 11, 2000 email: support@miva.com Web: http://www.miva.com/support ______________________________________________________________ NOTE: You are receiving this Tech Note because you subscribed to one of our lists or licensed software from us. WE DO NOT SEND UNSOLICITED EMAIL. If you would like to be removed from this list, please follow the unsubscribe info at the bottom of this message. ______________________________________________________________ In this tech note: * Staying Backwards Compatible When Changing Configurations * Using A Second Renamed Miva Binary File For A Secure Server * Changing Script Aliases To Avoid Conflicts Local Cgi Apps ______________________________________________________________ * Staying Backwards Compatible When Changing Configurations If you are implementing the use of the redirectonly and/or validextensions configuration options for the first time (See tech note #1) but want to avoid backwards compatibility problems with sites that may be using urls like: site.com/cgi-bin/miva?path/file.mv And: site.com/path/file.mv You can do the following. Your CGI-redirect would currently be set up in your srm.conf or httpd.conf like: # === BEGIN MIVA CONFIGURATION === AddType application/x-miva .mv Action application/x-miva /cgi-bin/miva # === END MIVA CONFIGURATION === If you make a copy of the 'miva' binary file and name it 'miva-redirect' you can then change your CGI-redirect to: # === BEGIN MIVA CONFIGURATION === AddType application/x-miva .mv Action application/x-miva /cgi-bin/miva-redirect # === END MIVA CONFIGURATION === Then in a copy of the 'miva.conf' named 'miva-redirect.conf' you can set: redirectonly=yes And comment out or remove the: validextensions=.mv,.hts This will allow urls to .mv files (Or other extensions assigned with similar Add Type directives) yet disallow urls like: somesite.com/cgi-bin/miva-redirect?file.mv But in the miva.conf you can comment out or remove the: redirectonly=yes And make sure you have a line like: validextensions=.mv,.hts This would allow urls like: somesite.com/cgi-bin/miva?path/file.mv Or: somesite.com/cgi-bin/miva?path/file.hts But not allow similar urls to files with any other extensions. NOTE: This will allow users to call files of alternate extensions such as .htm, .pl, .foo directly if additional AddType's are added to the srm.conf, httpd.conf, or to an .htaccess file on a given site like: AddType application/x-miva .htm AddType application/x-miva .pl AddType application/x-miva .foo But will not allow their use if the Action directive is used like: Action application/x-miva /cgi-bin/miva The reason being that there would already be an action set to the /cgi-bin/miva-redirect which has no validextensions restrictions, but actions set to /cgi-bin/miva will be restricted to the validextensions set in the miva.conf ______________________________________________________________ * Using A Second Renamed Miva Binary File For A Secure Server Another good use of a copied and renamed Miva binary file is when there is a need for configurations for a secure server that differ from the non-secure server. You can name a copy of the binary something like 'smiva' or 'miva-ssl' and then have an 'smiva.conf' or 'miva-ssl.conf' file with configuration options specific for those needs. ______________________________________________________________ * Changing Script Aliases To Avoid Conflicts Local Cgi Apps If you want to run The Miva Binary from a global cgi-bin, -- for space saving, ease of configuration, etc. -- and conflicts with cgi applications running in local cgi-bins, you can change the ScriptAlias in the httpd.conf or srm.conf file. It would normally look like: # === BEGIN MIVA CONFIGURATION === ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/ AddType application/x-miva .mv Action application/x-miva /miva-bin/miva # === END MIVA CONFIGURATION === And you could would change it to: # === BEGIN MIVA CONFIGURATION === # Set alias for global cgi-bin to be called miva-bin ScriptAlias /miva-bin/ /home/httpd/cgi-bin/ AddType application/x-miva .mv Action application/x-miva /miva-bin/miva # === END MIVA CONFIGURATION === This causes the .mv files to use an alias of /miva-bin/ which won't conflict with the calls to /cgi-bin/ when trying to run applications in a local cgi-bin. ______________________________________________________________ Non-Internet Access Information Miva Corporation 2629 Ariane Drive San Diego, CA 92117 858-490-2570: voice - For Support Press 3 858-490-0548: fax ______________________________________________________________ TO UNSUBSCRIBE: Send email to support@miva.com with the following in the subject unsubscribe Miva Tech Notes And the email address you sent the message from will be removed from the Miva Tech Notes distribution list. ______________________________________________________________ Miva is a registered trademark of Miva Corporation. "High Velocity E-Commerce," Miva Mia, Miva Empresa, Miva Merchant, Miva Order and Miva Engine are trademarks of Miva Corporation. All other trademarks are the property of their respective owners. This document is copyright 2000 Miva Corporation. All rights reserved. ______________________________________________________________ -Jeff Huber Support Manager Miva Corporation