[Gllug] Perl Question

Bruce Richardson itsbruce at uklinux.net
Mon Mar 10 18:03:58 UTC 2003


On Mon, Mar 10, 2003 at 11:59:02PM +0800, James wrote:
> 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.

Given that apache 1.x still supports the old separate conf files, it could
be safely split out into access.conf or simply an included file.

-- 
Bruce

I must admit that the existence of Disneyland (which I know is real)
proves that we are not living in Judea in AD 50. -- Philip K. Dick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 261 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20030310/30bf15d3/attachment.pgp>


More information about the GLLUG mailing list