Apache2 Linux – Common Commands

I like learning new things and recently I got to work with Apache Linux for one of my clients. Now I do not work with Linux much so this was a fun experience for me. I do not remember all the commands all the time so I had written down a few of the commands which I was using with Apache2 Linux. I am just listing down those common commands here so if I ever have to use them, I can refer to my own blog post.

Apache2 Linux  - Common Commands apache2linux-800x216

I have used Ubuntu for my experiments so all commands are only tested on that server.

Install Apache2:

sudo apt install apache2

Version Check:

apache2 -v

Version Check:

apache2 -v

Make sure that you use lower case v in the command above, when you use upper case V, it will give you complication settings.

Start Service

systemctl start apache2

It may ask you to provide your credential to start the apache server.

Stop Service

systemctl stop apache2

It may ask you to provide your credential to stop the apache server.

Restart Service

systemctl restart apache2

It may ask you to provide your credential to restart the apache server.

Reload Service

systemctl reload apache2

When you give a command to reload the server, it actually reloads all the configuration files to the system.

Concurrent Connections

netstat -ant | grep :80 | wc -l

Apache2 Linux  - Common Commands commonlinux

Here is the command list of all the concurrent connections the apache server is handling.

Well, that’s it for today. Let me know what you think of this quick blog post about Apache2 Linux commands. I am sure I am going to refer them in the future.

Let me know if you are interested to know more about this topic. I will write more blogs as well as create an SQL in Sixty Seconds video.

Here are my few recent videos and I would like to know what is your feedback about them.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

Previous Post
SQL SERVER – List Service Broker Queue Count
Next Post
SQL SERVER – CONVERT Empty String To Null DateTime

Related Posts

Leave a Reply