Author Topic: stopping apache  (Read 2294 times)

Anonymous

  • Guest
stopping apache
« on: May 08, 2004, 03:40:46 pm »
Hi, Couldnt find this on the forums but having loaded apache and php, I cant work out how to stop it, (started it using ./bin/httpd and works fine)  there is no apachectl?

Any help greatly appreciated.

Thanks

Mark

Foxdie

  • Sr. Member
  • ****
  • Posts: 465
    • View Profile
    • http://trackmygps.co.uk
stopping apache
« Reply #1 on: May 08, 2004, 03:43:46 pm »
Something like killall apached or apache or whatever it is. Issue ps ax to find the process(es).
Jason "Foxdie" Gaunt
HTC Universal G4 with 2GB SD card running Debian Titchy Linux
[img]http://trackmygps.co.uk/signatures/foxdie.gif\" border=\"0\" class=\"linked-sig-image\" /]
Click image to view my GPS tracker
Follow me on Twitter: @jasongaunt

Tehas

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • http://users.adelphia.net/~stonerrl/rick/
stopping apache
« Reply #2 on: May 08, 2004, 06:22:10 pm »
Here\'s a bash script that I uses to start/stop Apache.  I put this in /home/QtPalmtop/bin and then attached it to an icon on one of my tabs.  It uses the sudo utility to run stuff as root without having to login as root.  You\'d need to install that to run the script as is.

I\'m also using Opie-sh to display dialog boxes from the script.  Another package you\'d want to install.
Code: [Select]
#!/bin/bash                                                              

#--------------------------------                                        

# Toggle Apache on/off.                                                  

# 2003-06-07 -  r.l. stoner                                              

#--------------------------------                                        

                                                                        

(                                                                        

checkit=`ps -ef | grep http | grep -v grep | wc -l`                      

#echo $checkit                                                          

if [ $checkit -ne 0 ]                                                    

   then                                                                  

   echo "Stopping Apache ..."                                            

   sudo killall httpd                                                    

   opie-sh -m -w -t "Apache Toggled" -M "Apache has been terminated." -g

   exit 0                                                                

else                                                                    

   echo "Starting Apache ..."                                            

   sudo /home/www/bin/httpd                                              

   opie-sh -m -I -t "Apache Toggled" -M "Apache has been started." -g    

   exit 0                                                                

fi                                                                      

) > /tmp/doapach.log                                                    

                      

#--- end of script ---#
+SL-5600 v1.32 ROM (Special pre-emptive kernel with overclock)  +Viking 256CF  +SimpleTech 256CF  +Viking 128SD (as ext2)  +AmbiCom WL1100C +Micro Innovations KB  +Hawking Ethernet CF  
+SL6000L +Lexar 1GB SD (as ext2)  +Windows 98/Me/Nt/XP  +Mandrake 8.1 My Zaurus Page[img]http://users.adelphia.net/~stonerrl/rick/rls_userbar.gif\" border=\"0\" class=\"linked-sig-image\" /]

Anonymous

  • Guest
stopping apache
« Reply #3 on: May 09, 2004, 06:51:08 am »
Thanks for your replies, I\'ll have a go with the script.

One other question using phpmyadmin with mysql.

 If I login to mysql from another machine I connect to the zaurus web server using its IP address e.g. 192.168.0.x which puts me at the right place on the z. However, from there (main.php) I cant reach any links because it is looking for localhost which is not on my desktop (Mac OS or OSX).  Do you know how I get to localhost, or do I need to change user table in mysql with different hostname or add a new user and put the desktop IP there. Sorry this is so confusing (and not strictly z related)!

Best Regards

Mark
slc750, sharp rom

w14

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • http://
stopping apache
« Reply #4 on: May 09, 2004, 07:43:59 am »
Mark,

Apachectl was left out of the apache ipk for some reason, but you can get apachectl from the Zaurus Software Index.

http://killefiz.de/zaurus/showdetail.php?app=341

As for your phpmyadmin problem, why not just install one of the mySQL clients on your PC, and forget about phpmyadmin?

Mike.
sl-c3100
pdaxrom 1.1.0 beta1

Anonymous

  • Guest
stopping apache
« Reply #5 on: May 09, 2004, 02:23:02 pm »
Mike,

I\'ll download apachectl and try it, thanks.

The phpmyadmin would be nice to solve so I can use a web browser from another machine for editing, admin etc. True, I could use the mysql client though I will still have the same problem connecting. A readup os the mysql manual about setting up remote access will help me, so here goes ;-)

Mark
slc750,sharp rom