Find what MPM model Apache is using

Apache is the most popular web server, it is Open Source and modular. Multi-Processing Modules (MPM) in Apache decides how Apache listens to the network and handles the incoming requests. Apache have many MPM Modules (Multi-Processing Modules), the most popular among them are Prefork, worker, and Event. You can only activate one Apache MPM at […]

Read More…

React Application showing 404 error on refresh

On Apache server, React Application works fine, but if you refresh a page, it shows 404 error. This is because the application use BrowserRouter. To fix the error, create a .htaccess file with following content

Put this on the folder where your application index.html is or in Apache Virtual Host entry. See htaccess […]

Read More…

Restart Apache if failed

This bash script check web site every 5 minutes, restart the web server if web site is not responding. Create a file


In above code, replace https://YOUR_DOMAIN.EXTN/ with your sites actual url. Make it executable

Create a cronjob


See Server Monitoring […]

Read More…

Starting httpd: (99)Cannot assign requested address

On a server, when i restart apache, i got the error

The error was due to Apache trying to bind to an IP address, that is no longer present in the server. This is fixed by modifying /etc/httpd/conf/httpd.conf Replace


See Apache […]

Read More…

Apache Auto Renew SSL on Password Protected site

I have a web site that is password protected using Apache basic autenticiation. I used following code in Apache config to password protect.

The problem is when SSL need auto renew, it need url like http://domain/.well-known/ to be accessable with out any password for domain ownership verification. To allow .well-known folder to be accessable […]

Read More…

apachectl status www-browser not found

apachectl status

On a Ubuntu server, run i run apachectl status, i get following error.

To fix error, install lynx text based browser.

After installing lunx, apachectl status started working. See Apache […]

Read More…

Apache LogFormat show full domain name

To show full domain name in Apache access log, you can use following log format

If you want to show port also, use


Read More…