[Gllug] Perl Question

James Bromberger james at rcpt.to
Mon Mar 10 15:59:02 UTC 2003


Tethys (tet at accucard.com) wrote:
> >        I have written a Perl script that adds a virtual host to the
> >end of my httpd.conf file from input i give it on a form, and now i
> >need the script to run apachectl after its done it, but since this is
> >a root command, how can i get the script to run it?
> 
> Have apache run on a non-privileged port, and set up port forwarding so
> requests to port 80 are redirected to the actual port? Then you can run
> apache as a normal user...
> 
> Or just use sudo.

I'd agree with the sudo approach (or RBAC where available). It sounds
like you have a *web* form for this, so you may want your script to also
make backups of your httpd.conf file; often this has *so* many
customisation that scripting over it and losing it can be... painfull.

Alternatively, you can look at mod-mass-virtual-hosting too...

Regards,
  James
-- 
 James Bromberger <james_AT_rcpt.to> www.james.rcpt.to
 Remainder moved to http://www.james.rcpt.to/james/sig.html

I am in London on UK mobile +44 7952 042920.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20030310/ccad8168/attachment.pgp>


More information about the GLLUG mailing list