Start/Restart/Stop Apache2 web server on linux

Here are some short commands for linux OS you can use to execute start/stop and restart apache services. Commands must be executed from linux terminal/ssh in other words they all are ssh commands.

To Start Apache2 web server:

# /etc/init.d/apache2 start
OR
# /etc/init.d/httpd start
OR
# service apache2 start
OR
# service httpd start

To Stop Apache2 web server:

# /etc/init.d/apache2 stop
OR
# /etc/init.d/httpd stop
OR Read More

Apache2 high RAM usage resolution

In this post i will describe how to decrease memory usage of apache2, i tried to search on google and found many solution to that problem but nothing worked for me. So i discovered a way to decrease the memory usage of apache2.

Apache

Apache

Here is the solution:

  • Login to your server via putty / shell terminal with root access.
  • Execute following command:
# cd /etc/apache2
# nano apache2.conf
  • A text editor will appear with apache2 configuration file find the below line in it:
KeepAlive On
  • Replace this line with:
KeepAlive Off Read More