Announcement

Collapse
No announcement yet.

Empresa 3.9 on Plesk (episode 2)

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

    Empresa 3.9 on Plesk (episode 2)

    I have managed to get my "standard" sites working ok. (I discovered that the reason the vhost.conf fileswere having no effect is that a script must be run to rebuild the plesk configuration files - I shall document this somewhere).

    I have two (related) sites which are still a problem: They are multilingual and require UTF-8 output. Since Miva 3.x can't write headers, this is achieved by a little shell script called miva-headerwrap:

    Code:
    #!/bin/sh
    # Quick little script to remove the content-type header and allow
    #  a miva script to provide its own headers
    #  NOTE: The normal htscookie will also not be set unless its passed back
    #  NOTE 2: If you do not provide a content-type and a new line the script will
    #    also internal server error
    pth=`pwd`
    $pth/miva $* |sed '
      1,/Content/{
        1,/^\r$/d
        /\\r/d
        /^$/d
      }
    '
    (sed must win prizes for most obscure syntax!)

    on servers where the miva type is already defined, this is called with a one-line .htaccess:
    Code:
    Action application/x-miva /cgi-bin/miva-headerwrap
    ,
    but I can't get my head around how to call it here:

    The standard vhost.conf file is:
    Code:
    ScriptAlias  /miva /var/www/vhosts/[domain]/cgi-bin/miva
    
    DirectoryIndex  index.mv index.php index.html
    AddType application/x-miva .mv
    Action application/x-miva /miva
    If I just substitute miva-headerwrap in the path I get internal server errors - premature end of script headers.
    I have a suspicion that I need to tell the system to use miva first then override that with headerwrap. Is there anyone out there with great server-fu?

    Richard
    Richard Grevers
    Dramatic Design
    New Plymouth, New Zealand

    #2
    Re: Empresa 3.9 on Plesk (episode 2)

    Well that was a load of tearing my hair out over nothing - if I had tried it without miva-headerwrap I would have found that it works fine. Basically the global config on apache is to send UTF-8 so this overwrites the ISO-8859 put out by miva.

    So, nothing to see here folks, move along now.
    Richard Grevers
    Dramatic Design
    New Plymouth, New Zealand

    Comment

    Working...
    X