Apache2, PHP, SuEXEC: legacy CGI for ClipShare and the rest of them

In this article we configured apache2 with php as suExec CGI module. The configuration is a little bit more complicated then regular mod_php but offers definite advantage with php running with script owner privileges.
However there could be situations where this creates additional problems.

Let me explain what I mean by that.
ClipShare is very well known and widely used video clip sharing portal – Youtube clone, so to speak.
For video upload it uses GPL Uber Uploader subsystem – CGI based.
The problem is that ubr_upload.pl CGI script is running under ClipShare “base dir” and as such is considered by suExec as invalid and gets effectively disabled.
Since ClipShare allows to configure upload cgi URL only relative to it’s own document root it will require to change apache virtual host configuration to fix the problem.
Here is Our original virtual host configuration.

And here is modified version which works for the regular (non-Fast) CGI scripts with suExec.

That’s right – we are changing ScriptAlias to the user owned subdir under /var/www/cgi-bin to please suExec.
Now all we have to do is to create symlink there from user homedir and move our CGI scripts there.

To make virtualmin work with this change we will need to modify Virtualmin apache virtualhost template, and post-creation shell script accordingly.
Virtualmin:

post-creation shell script:

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">