I've got an Apache question here.
For my entire career as a developer, I've been restarting Apache like this:
sudo /etc/init.d/apache2 restart
I just today deployed my first Rails application, but I was having trouble getting Apache to restart on the host machine. When I tried it that way, Apache would try to restart, but would ultimately hang.
This, however, worked fine:
sudo apachectl restart
What are the differences between these two techniques? I had assumed that the latter was, at best, "syntactic sugar" for the first, but that must not be the case, given that the latter worked while the former did not.
If it's relevant (and I suspect it may be), this Rails application uses Phusion Passenger. My prior development experience (whereby the former method works fine) is mostly with PHP. I'm pretty new to Rails.
The server in question is runs Ubuntu 11.04 (Natty).