how to check Web Server Running on fedora server?

asked Aug 29, 2015 in LINUX by rajesh
0 votes

1 Answer

0 votes
Now that you are sure your server is installed, is it running?

There are plenty of ways of finding out if the service is running or not. One method that is fairly cross-platform is to use the netstat command.

This will tell you all of the processes that are using ports on the server. We can then grep for the name of the process we are looking for:

sudo netstat -plunt | grep apache2
tcp6       0      0 :::80           :::*            LISTEN      2000/apache2
You should change "apache2" to the name of the web server process on your server. If you see a line like the one above, it means your process is up and running. If you don't get any output back, it means you queried for the wrong process or that your web server is not running.

If this is the case, you can start it using your distribution's preferred method. For instance, on Ubuntu, you could start the Apache2 service by typing:

sudo service apache2 start
On CentOS you might type something like this:

sudo /etc/init.d/httpd start
If your web server starts, you can check with netstat again to verify that everything is correc
answered Aug 29, 2015 by rajesh