Query failed: connection to localhost:9312 failed (errno=111, msg=Connection refused). Stop/Start Apache? - Genius Bar Discussions on AppleInsider Forums Toggle navigation All Forums Recent Posts Sign In Stop/Start Apache? unremarkable Posted: July 21, 2004 7:22PM in Genius Bar edited January 2014 I'm looking for a quick way to stop or start Apache, without going into Preferences.Is it possible via AppleScript or something?Thanks in advance, unry Comments Reply 1 of 3 willoughby Posts: 1,457member July 21, 2004 8:36PM You can stop, start and restart apache from the command line with these commands:apachectl -k startapachectl -k stopapachectl -k gracefulThe last one is the best way to quickly stop and restart apache. I'm sure you could write an applescript to send those to the command line. Reply 2 of 3 unremarkable Posts: 220member July 22, 2004 5:15AM Thanks. I tried sending those to the terminal with QuicKeys, but it doesn't work...is it because I've installed Apache 2? Reply 3 of 3 1337_5l4xx0r Posts: 1,558member July 24, 2004 2:49AM Honestly, what is hard or time consuming about opening System Preferences? That is probably the easiest way to start/stop Apache that I've yet seen.Write a bash script (type text into a plain text document with Textedit and then 'chmod +x' it to make it executable) and simply execute that whenever you want Apache to start stop. Sign In or Register to comment.