Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Restart Apache Server from Command Line

Help
Brad
2013-02-08
2013-02-08
  • Brad
    Brad
    2013-02-08

    I'm developing a totally portable web solution for a coworker, and to help with development, I've got a simple batch file that lets me copy the code from my Eclipse workspace to the vspace/web folder of the ZWAMP directory, but in order to deploy to the virtual drive it I have to restart the server.

    I was wondering if there is a way I could work the server restart into the script? I've tried just calling the httpd.exe program with the restart flag, but it cannot find the running instance of Apache, and I would need to stop the Apache server, copy the files 'manually' and then start it again anyhow, so I'd like to just automate restarting the ZWAMP server from the batch file.

    TLDR;
    How do I restart ZWAMP from a command line/batch file?

    Any help is greatly appreciated, thanks!

     
  • Bong Cosca
    Bong Cosca
    2013-02-08

    taskkill /im zwamp.exe
    c:/path/to/zwamp.exe

     
  • Brad
    Brad
    2013-02-08

    Thanks! That is working well, except that I had to put a pause in between them so I could wait until the server had actually been shut down before I let it start back up.