0

If I stop the apache server by systemctl stop httpd command, and if I ping it from command prompt (ping [server’s IP address]), it pinged successfully, why ? I was created the server on Google Cloud Platform and then I stopped the server by run this command on shell. But when I ping it, it pinged successfully, why ?

2

You simply stopped the (Apache) service running on the (Google Cloud) server, not the server itself.

The ping demonstrated that the server is still running (and responding to pings). If you try to connect to port 80 then it should fail, confirming that the http service isn’t running.

5
  • 1
    To make it more explicit: Apache HTTPd is not involved with ICMP Echo Requests (“Ping”) at all. – Daniel B Mar 30 at 12:51
  • Terminology here is important - the terms "server" and "service" can usually be used interchangeably when referring to a piece of software but not a physical machine. You stopped the apache service, but the physical server machine is still running. – Sam Forbis Mar 30 at 13:35
  • @SamForbis but if I try to reach the server by paste the IP address (IP_Address) in browser after stop the server it shows that This site can’t be reached. – Sanniddha Chakrabarti Mar 30 at 13:51
  • @Richard I tried to ping with port number (for example: ping 35.193.35.4:80). But it shows that Ping request could not find host 35.193.35.4:80. Please check the name and try again. – Sanniddha Chakrabarti Mar 30 at 13:53
  • 1
    @SanniddhaChakrabarti Richard's answer is entirely correct. The service that you run on your machine called Apache is only a web server. The machine that runs that web server is still running even after you terminate the Apache process. The machine's Operating System is what responds to ping requests, not apache. You also cannot "ping" an address with a port number. It's only used to determine if a machine is able to be reached, not if a specific port can be reached. – Sam Forbis Mar 30 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.