Could you be just simply after echo $HTTP_HOST in shell script?
If that's not it don't ask me again directly, I still can't understand the 
question.

On Fri, 28 Nov 2003, Louis wrote:

> For domain accounts on the server I'm using there is no httpd.conf under
> the directory /etc/httpd/conf, although the directory itself exists.
> 
> This file can only be seen from admin or root user's "/etc/httpd/conf"
> directory owned by root.
> 
> Then what does the browser ENV% queries to get HTTP_HOST as www.domain.com
> 
> > awk '/^ServerName/ { print $2 } ' /etc/httpd/conf/httpd.conf
> 
> This from root command line as well just dumps the Server Name. Running
> the command from the domain account command line gives "httpd.conf" not
> found.
> 
> My objective is to get a Perl command line script get this for a domain.
> That's why I was trying some Net modules. Via browser the script gets it
> easy from the ENV%.
> 
> Louis.
> 
> >>>>>> "Grant" == Grant Parnell <[EMAIL PROTECTED]> writes:
> >
> >
> >
> > Grant> HTTP_HOST=`grep "^ServerName" /etc/httpd/conf/httpd.conf| awk
> > Grant> '{print $2}'`
> >
> > Why bother with grep when awk can do it for you?
> >
> > $ awk '/^ServerName/ { print $2 } ' /etc/httpd/conf/httpd.conf
> >
> > or whatever.
> >
> >
> > Sorry, but excessive processes in pipelines hit a button of mine...
> >
> > --
> > Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT
> > gelato.unsw.edu.au
> > The technical we do immediately,  the political takes *forever*
> >
> 
> 
> 

-- 
---<GRiP>---
Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist, 
Linux Guru, SLUG/AUUG/Linux Australia member, Sydney Flashmobber,
BMX rider, Walker, Raver & rave music lover, Big kid that refuses
to grow up. I'd make a good family pet, take me home today!
        Do people actually read these things?


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to