Linux Server

How to Check mod_rewrite Module in Apache/LiteSpeed is Loaded

To check if mod_rewrite Module is loaded in Apache/LiteSpeed follow the following steps

1. For system with cPanel, log to SSH in issue the following commands

/usr/local/apache/bin/httpd -D DUMP_MODULES | grep rewrite

If it return the following, then mod_rewrite is loaded

Syntax OK
rewrite_module (static)

2. For system with no cPanel, check “httpd.conf” file. If the following is in the file then it should be loaded.

LoadModule rewrite_module libexec/apache2/

Increase MySQL Maximum No Connection in CentOS VPS

In you have rather busy VPS, the default MYSQL Maximum No Connection maybe not sufficient. To increase follow the steps below.

1. SSH to your VPS

2. Check the current maximum no connection limit

echo "show variables like 'max_connections';" | mysql

3. Edit my MySQL file. Remember to backup your /etc/my.cnf prior to that.

vi /etc/my.cnf

4. Add or edit connection limit in the MySQL configuration file

max_connections = 250

5. Save MySQL configuration file

6. Restart mySQL

service mysql restart

7. Confirm the new maximum no connection limit

echo "show variables like 'max_connections';" | mysql