Re: Fwd: Re: Daemon configuration for Apache

From: Amrahsa (amrahsa_at_yahoo.com)
Date: 04/28/04


Date: Wed, 28 Apr 2004 07:52:52 -0700 (PDT)
To: beginners@perl.org

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.

>>> amrahsa 4/26/2004 8:35:29 AM >>>
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:
>
> On Apr 24, 2004, at 2:46 AM, amrahsa wrote:
> [..]
> > 1) When the system boots up I found in which run
> level System boots up
> > and go to corresponding directory e.g.
> /etc/rc.d/rc3.d
> > 2) I look for Sxxapache or Sxxhttp file to see if
> apache startup file
> > is there
> >
> > Now my problem is one apache startup The
> configuration file Sxxapache
> > or Sxxhttp has used some configuration file based
> on some shell script
> > to invoke the configuration file as parameter and
> i need to know that
> > file in my daemon to read that file e.g.
> httpd.conf file
> >
> > If you have any idea please help me to resolve
> 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 


Relevant Pages

  • Re: Daemon configuration for Apache
    ... get the path for httpd.conf file when the System boots ... >> Now my problem is one apache startup The ... >> or Sxxhttp has used some configuration file based ... > on some shell script ...
    (perl.beginners)
  • mass process
    ... I have to add one entry to a configuration file for 200+ hosts. ... I'll have a external file with hostname ... Is it possible to do this in one script and one run? ... Do you Yahoo!? ...
    (SunManagers)
  • Re: env var dump - why?
    ... > Working on a script that has one huge problem. ... > # Configuration is done all through one configuration file ... > echo "Starts or stops multiple instances of zope one by one or all ...
    (comp.unix.shell)
  • Re: Protecting passwords in Perl scripts?
    ... > the script or contained in an external configuration file (which must be ... > readable by the effective uid of the script). ... Don't bother with encryption or set-id's, ... to the actual threats you face. ...
    (comp.lang.perl.misc)
  • env var dump - why?
    ... Working on a script that has one huge problem. ... # Starts or stops multiple instances of zope one by one or all at ... # Configuration is done all through one configuration file ... echo "Starts or stops multiple instances of zope one by one or all ...
    (comp.unix.shell)