| 
 
 
 | 
| Keep Server Online 
 If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
 
 or
 
 
   
 A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
 
 Thank You! Steffen
 
 Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
 |  | 
 | 
| | 
| | 
|  Topic: Batch file needed for restart with a difference |  |  
| Author |  |  
| funkyspider 
 
 
 Joined: 17 Jan 2007
 Posts: 16
 Location: Oldham, UK
 
 | 
|  Posted: Wed 16 Apr '08 21:40    Post subject: Batch file needed for restart with a difference |   |  
| 
 |  
| I'm having a problem with apache running on a windows server. It's a long drawn out story but basically what I want is a batch file / exe that I can run when apache stops responding to stop it and then start it, not restart it. 
 Doing a restart from the apache monitor while on the server does restart apache, but the web site isn't available for some reason, but doing a stop then a start seems to be ok.
 
 I haven't got a clue why, or what I need to do to fix it, so for the short term can someone give me some idea as to the batch file I would need?
 
 Once that is running so that apache restarts properly and the server doesn't have to be rebooted I can try and figure out what else is screwed to be causing the problems.
 
 Thanks
 |  |  
| Back to top |  |  
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Wed 16 Apr '08 23:29    Post subject: |   |  
| 
 |  
| you can use apache itself with
 httpd -k stop
 httpd -k start
 
 or
 
 net stop Apache2
 net start Apache2
 
 maybe net stop apache2.2  and net start apache2.2 depending what the name of the service is.
 |  |  
| Back to top |  |  
| funkyspider 
 
 
 Joined: 17 Jan 2007
 Posts: 16
 Location: Oldham, UK
 
 | 
|  Posted: Wed 16 Apr '08 23:40    Post subject: |   |  
| 
 |  
| ok, I'll give it a try 
 thanks
 |  |  
| Back to top |  |  
 
 | 
 |  | 
 |  |