code: def reload_webservers():
      
      if env.verbosity:
          print env.host, "RELOADING apache2"
      with settings(warn_only=True):
          a = sudo("/etc/init.d/apache2 reload")
          if env.verbosity:
              print '',a        
      if env.verbosity:
  
          #Reload used to fail on Ubuntu but at least in 10.04 it works
          print env.host,"RELOADING nginx"
      with settings(warn_only=True):
          s = run("/etc/init.d/nginx status")
          if 'running' in s:
              n = sudo("/etc/init.d/nginx reload")
          else:
              n = sudo("/etc/init.d/nginx start")
      if env.verbosity:
          print ' *',n
      return True
docs: Reload apache2 and nginx