For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > April 2004 > Re: Fwd: Re: Daemon configuration for Apache









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Fwd: Re: Daemon configuration for Apache
Amrahsa

2004-04-28, 12:41 pm


It would be great if any one can help me in the problem i faced below, I got stuck here and have to find out some alternative here.





Thanks.



Hi,
You understand the problem correctly. I wanted to
get the path for httpd.conf file when the System boots
up and my daemon will parse the httpd.conf file to get
the Server Address and the port number and some
additional information from where your Server runs. I
wanted to show this information to the user So that
they can directly change their configuration rather
than editing the file, I have reached till the steps
where i can look for /etc/rc.d/rc3.d for httpd and
apache files but seems for each vendor these files are
written differently and i can not found the exact
httpd.conf file. Please suggest what you say.

Thanks,

--- drieux wrote:[color=darkred]
>
> On Apr 24, 2004, at 2:46 AM, amrahsa wrote:
> [..]
> level System boots up
> /etc/rc.d/rc3.d
> apache startup file
> configuration file Sxxapache
> on some shell script
> i need to know that
> httpd.conf file
> this problem.
> [..]
>
> Let me see if I get your core problem here,
>
> you want to parse out the httpd.conf
> but you want to find it 'dynamically'
> based upon what is in the /etc/rc.d/rc3.d section?
>
> you do understand that you could find the 'init
> script'
> for apache in
>
> /etc/rc.d/apache
>
> on SuSe distributions, while on Red Hat you would
> need to be looking for
>
> /etc/rc.d/init.d/httpd
>
> eg:
> disky: 62:] ls -li ./init.d/httpd ./rc3.d/S99httpd
> 1055235 -rwxr-xr-x 1 root root 2245
> Dec 10 02:05
> ./init.d/httpd
> 97370 lrwxrwxrwx 1 root root 22
> Aug 7 2002
> ./rc3.d/S99httpd -> /etc/rc.d/init.d/httpd
> disky: 63:]
>
> so clearly first off you can figure out which
> version
> of linux you are playing with by how they did their
> lay out - and there is little real 'useful'
> information
> that is in those init scripts to begin with. The
> line you would of course be interested in is
>
> [ -r /etc/sysconfig/apache ] && .
> /etc/sysconfig/apache
>
> the other line where it is 'including' anything
> is merely the shell library of rc_init functions
> that is common to all of the rc scripts.
>
> So what you really want to be resolving is whether
> you will find the httpd.conf in say
>
> /etc/httpd/conf/httpd.conf
>
> or not - since reasonable folks do not generally
> stuff shell variables into /etc/sysconfig/apache
>
> At which point there is the other odd question
> that comes to mind, why? What is it you are
> really trying to work out ? Why not talk to
> the httpd directly?
>
>
> ciao
> drieux
>
> ---
>
>
> --
> To unsubscribe, e-mail:
> beginners-unsubscribe@perl.org
> For additional commands, e-mail:
> beginners-help@perl.org
>
>
>
>





__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org






---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com