Announcement

Collapse
No announcement yet.

mod_deflate

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

    mod_deflate

    Hi all,

    We are trying to enable compression on our site through htaccess but this does not seem to work with Miva URL's, only static pages. Is there a way to turn mod_deflate on for Miva?

    Thanks in advance for your time.

    #2
    If the site is hosted with us, please open a support ticket and request that the server have nginx added. It will compress all content and you can remove anything related to deflate from htaccess. It will also handle requests for static requests much faster, providing better overall performance.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      Thanks for the information and quick reply. Unfortunately we are not hosted with your company. Is this option readily available or is there a cost associated with it? If that is not an option, any way to get mod_deflate to work?

      Comment


        #4
        Okay, nginx is just the easy way around this. It's a web server that is often deployed in front of Apache to handle static requests, and then content, such as Miva Merchant, that is dynamically generated, comes back through it where it can be compressed without extra work or the need for mod_deflate.

        It may be worth inquiring with your host if such a setup is an option as it may be an easy change.

        Barring that, it is also possible to use mod_deflate for Miva Merchant output in a traditional apache setup, it requires the relevant config directives be put in the server's config file though as Merchant is generated by a cgi-script called Miva Empresa, and normally the output goes directly from Empresa to the visitors browser, so they'll need to add the mod_deflate directives for the relevant content type into the 'script alias' portion of their server config.

        David Hubbard
        CIO
        Miva
        [email protected]
        http://www.miva.com

        Comment


          #5
          Thanks for the info. We may favor going with the mod_deflate as it would be more straight forward given our current configuration. Would we use the same syntax what is used in htaccess or is it a Miva-specific script?

          We use this to compress only textual content.

          <IfModule mod_deflate.c>
          <FilesMatch "\\.(js|css|html|htm|php|xml)$">
          SetOutputFilter DEFLATE
          </FilesMatch>
          </IfModule>

          Thanks again for your help.

          Comment


            #6
            You would need to add a directive that is specific to the content type that has been defined to map requests for MivaScript files to the Miva Empresa engine. Traditionally, this will look something like the following:

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

            So we're creating a new content type called application/x-miva-compiled that is mapped to files bearing the extension .mvc, and then telling Apache to handle those requests by calling /cgi-bin/mivavm. The above may be completely different on your server.

            If you know the value used for the AddType directive, then your apache config would need an additional line in what will probably be the VirtualHost section where the ScriptAlias directive occurs, and it will look like this:

            AddOutputFilterByType DEFLATE application/x-miva-compiled

            Oviously that is specific to the content type name we use, so you'd have to customize from there. Then restart apache.
            David Hubbard
            CIO
            Miva
            [email protected]
            http://www.miva.com

            Comment


              #7
              Originally posted by ILoveHostasaurus View Post
              If the site is hosted with us, please open a support ticket and request that the server have nginx added. It will compress all content and you can remove anything related to deflate from htaccess. It will also handle requests for static requests much faster, providing better overall performance.
              Is this something new? I had been given the "deflate" snippet to add to an htaccess file.

              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

              Comment


                #8
                Originally posted by lesliekirk View Post

                Is this something new? I had been given the "deflate" snippet to add to an htaccess file.
                New servers have been deployed with this config for about two years; older servers may or may not need it added. If deflate directives are in place, they won't cause harm, but also will not be doing anything useful if the server has been updated to the newer config.
                David Hubbard
                CIO
                Miva
                [email protected]
                http://www.miva.com

                Comment


                  #9
                  ILoveHostasaurus, Awesome! I will try this out. Thank you for the time and effort to provide such an excellent explanation. I will let you know how it turns out.

                  Thanks again.

                  Comment

                  Working...
                  X