LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   remote restart apache (https://www.linuxquestions.org/questions/linux-software-2/remote-restart-apache-23108/)

sim 06-11-2002 12:12 AM

remote restart apache
 
I'm finding a way to restart apache server remotely through web interface. I don't want to use webmin since I have seperate interfaces to manage other services. Does anyone have idea how to work it out? The problem is that not all the servers I'm managing has superl complied. Any other way can work this out? (cron job is not considered for some reason.) Thank you!

PenPen 06-11-2002 05:49 AM

php?
 
php code _ADMIN.PHP_ ----

#copy an md5 (crypt whatever) pass here :
$passord = "Sup3r L3T, c%pt pasS";

if (!isset($m))
{
echo "<form action=\"?m=2\" method=\"post\">";
echo "please input your personnal code : <input type=\"password=\" name=\"secPass\">";
echo "<input type=\"submit\"></form>";
}

if ($m == "2")
{
if ($passord == md5($password))
{
system("/path/to/apachetrcl restart");
echo "finito";
}
}


be creative....


All times are GMT -5. The time now is 02:47 AM.