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*
>


-- 
I'm always learning something new everyday. Thanks Sluggers.
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to