John V. Jaskolski wrote:

> I want to write a Web Hosting Control Panel for virtually hosting web sites
> (100 to 1000 per server).  I am debating whether to write it in Perl,
> mod_perl or C.  I want to write it in mod_perl because it would be faster
> than Perl and easier to write than C.  However, In his article on modperl
> and ISP's, Stas says:
> 
> 
>>> Note that it's impossible to run suEXEC and cgiwrap extensions under
>> 
> mod_perl.
> 
>>> Of course as an ISP you can run mod_perl internally, without allowing your
>>> users to map their scripts so that they will run under mod_perl. If as a
>> 
> part of
> 
>>> your service you provide scripts such as guest books, counters etc. which
>> 
> are
> 
>>> not available for user modification, you can still can have these scripts
>> 
> running
> 
>>> very fast.
>> 
> 
> I have 2 questions:
> 
> 1.) How do you "run mod-perl internally"?

Just as an example you can create a global mod_perl registry location 
containing scripts that all your clients can use, but not modify. While 
using a different registry enabled directory for your control-panel.
Note: the entire server still has mod_perl loaded regardless of whether 
or not the clients are using mod_perl scripts so you'd better have 
enough ram.

This may contain errors:


#Create a global registry directory in the main server:

Alias /preconfig-scripts/ /home/httpd/user_untouchable
#counters, guestbooks, etc
<Location /preconfig-scripts/>
        SetHandler perl-script
        PerlHandler Apache::Registry
        Options +ExecCGI
</Location>

#In the virtual hosts:
#your domain:
NameVirtualHost xxx.xxx.xxx.xxx
<VirtualHost xxx.xxx.xxx.xxx>
        ServerName your.isp.net
        DocumentRoot /home/httpd/ispname
        <Directory /control-panel/>
                SetHandler perl-script
                PerlHandler Apache::Registry
                Options +ExecCGI
        </Directory>
</VirtualHost>
#a client:
<VirtualHost xxx.xxx.xxx.xxx>
        ServerName www.someclient.com
        DocumentRoot /home/httpd/someclient
        <Directory /home/httpd/someclient>
                Options Includes
                AllowOverride AuthConfig Indexes Limit

        </Directory>

        ScriptAlias /cgi-bin/ /home/httpd/someclient/cgi-bin/
</VirtualHost>

 
> 2.) If is there a way to "run mod-perl internally" so that suEXEC and/or
> cgiwrap can be run for security purposes.
> 
> The whole reason I hesitate to use mod_perl is because this will be a
> virtual hosting environment where lots of users could "do anything", and I
> want to take all of the security precautions I can.  But if it's at all
> possible to do it securely, then I would love to use mod_perl because it
> would be much easier than C.
> 
> Any input anyone has would be greatly appreciated!
> 
> Sincerely,
> 
> Dr. John V. Jaskolski


-- 
Daniel Bohling

Reply via email to