Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Apache Restart

by gopalr (Priest)
on Aug 24, 2006 at 13:46 UTC ( [id://569363]=perlquestion: print w/replies, xml ) Need Help??

gopalr has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

Whenever I change the Module file, I need to restart the apache server by using the following commands in Debian.

/etc/init.d/apache-perl stop /etc/init.d/apache-perl start

I feel its little bit uneasy to run again and again.

Please guide me if there is any other way to restart the apache server as soon as I modified the Module file.

Thanks in Advance,
Gopal.R

Replies are listed 'Best First'.
Re: Apache Restart
by clinton (Priest) on Aug 24, 2006 at 14:17 UTC
    You don't speciy what the Module file is, or how you are running it, but if you need to keep restarting apache, I'm supposing that you're running something under mod_perl, in which case you should just be able to use:

    /etc/init.d/apache-perl restart or /etc/init.d/apache-perl graceful

    Alternatively, because it doesn't sound like you are making use of mod_perl, you may want to use ModPerl::Registry to run your CGI with the power of mod_perl.

    See Getting your feet wet with mod_perl

Re: Apache Restart
by derby (Abbot) on Aug 24, 2006 at 14:13 UTC

    For production sites, yes, that's what you want to do. For dev or test sites, Apache::StatINC is what you want.

    -derby
      These days we recommend Apache::Reload/Apache2::Reload instead.
Re: Apache Restart
by imp (Priest) on Aug 24, 2006 at 14:21 UTC
    /etc/init.d/apache-perl is just a shell script that encapsulates common tasks. Read through it to see your other options.

    You can also do the following:

    • reload - same as 'apachectl graceful' (sends USR1 signal)
    • restart - same as 'apachectl restart' (sends HUP signal)
    • reload-modules - same as stop + start
Re: Apache Restart
by sub_chick (Hermit) on Aug 24, 2006 at 14:00 UTC
    As far as I know, Apache doesn't support config changes without a restart so I don't know of any guide to help you out with that.
    But as far as perl goes System Function might do the trick if you make a small application in /usr/bin/ that would stop and then start your apache server by just running the one worded program from the terminal. Will save you alot of tedious keystrokes.

    Hope this helps.


    Es gibt mehr im Leben als Bücher, weißt du. Aber nicht viel mehr. - (Die Smiths)"
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://569363]
Approved by prasadbabu
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-28 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found