premature end of script headers.

Virtualmin
Shanta
2008-06-18
2013-05-21
  • Shanta
    Shanta
    2008-06-18

    Hi

    I have installed webmin 1.420 Virtualmin version     3.58.gpl (GPL)on debian lenny sever.

    I restored the Virtual host files using the back up and restore function in Virtual admin. Now no Perl script seem to work on the port 80 server.

    Apache log report premature end of script error.

    suexec.log reprot uid: (1006/organic) gid (1004/1004) cmd: faq.cgi
    cannot get docroot information (/var/www)

    Of course the doc root for organic is /home/organic/public_html

    How do I get cgi back on line?

    Thanks
    Shanta

     
    • Hi

      I assume the perl script is executable?

      From the sounds of it when you installed the apache it installed with SUEXEC turned on in the default directories (/var/www)

      You need to either re-compile apache or reinstall apache specifying that the directories you are going to be running CGI's and SUEXEC apps from as /home/organic or better yet just /home - it should pick up the public_html automatically if I remember apache SUEXEC correctly.

      You can also do this by re-compiling only SUEXEC with the proper switches if you are comfortable doing that.

      Apache SUEXEC tries to be extremely security concious and will not allow execution of an application by a user other than the web server itself, outside of the specified SUEXEC directories.

      If you have shell access try typing 'suexec -V' and look at the output it gives you. That will show you where suexec is looking too for it's DOC_ROOT and the userdir suffix underneath that.

      The other quick fix is to disable SUEXEC but depending on your situation you may or may not want to do this. (I wouldn't)

      Hope that helps.

       
      • Shanta
        Shanta
        2008-06-23

        Yes all files were working prior to install through backup on 2 new servers. The worked on the server they came from. So I think it is a the problem you suggest.

        I will give it a go. Can I find instructions for recompile at Apache?

        I used the deb files from Webmin. They should have done this in the setup process.

        Thanks
        Shanta