[Gllug] Perl Question

Walid Shaari Walid at melinux.com
Mon Mar 10 18:11:39 UTC 2003


On Mon, 2003-03-10 at 18:03, Bruce Richardson wrote:
> 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.

how about mod_vhost? is that an option?

Walid.



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list