HostOnNet Blog


Nginx List Installed Modules

To list all installed modules in NginX web server, run Example [root@3blogger ~]# nginx -V nginx version: nginx/1.10.2 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013 TLS SNI support enabled configure arguments:


Blocking Traffic With Apache GeoIP Module

To install GeoIP module in CentOS Apache server, run Now verify mod_geoip installed in apache by running Example [root@3blogger ~]# httpd -M | grep geoip geoip_module (shared) [root@3blogger ~]# Now edit /etc/httpd/conf/httpd.conf add following In your Apache VirtualHost, add This


Enable monitoring of service on Cpanel Server

To enable monitoring of all services on Cpanel Server, run Example root@server20 [~]# whmapi1 enable_monitor_all_enabled_services — data: services: – monitored: 1 service: mysql metadata: command: enable_monitor_all_enabled_services reason: OK result: 1 version: 1 root@server20 [~]# See also tailwatch, cpanel server


Repair MySQL database with mysqlcheck

mysqlcheck command can be used to check, repair, optimize or analyzes tables in a MySQL database. To check a database for errors, run If you database need user name and password, specify it with -u USER-NAME -p, for example This


Install Nginx on CentOS 7

First enable epel repository by running Now you can install nginx with Nginx configs are available in folder /etc/nginx, main config file is /etc/nginx/nginx.conf To start nginx, run To Stop, run To allow HTTP and HTTPS in firewall, run


Deleting spam mails with exiqgrep

exiqgrep is a command to search in exim mail queue. To freeze all mail from a domain, run To freeze all mails by recipient domain, run To delete all frozen mails, run


FreeBSD – A revisit after 10 years (part 2)

This is Part 2 of Post FreeBSD – A revisit after 10 years FreeBSD ports allow you to install software from source. Ports tree is stored in folder /usr/ports. On this server /usr/ports folder does not exists. We need to


FreeBSD – A revisit after 10 years

During 2004-2006 we used FreeBSD on all our servers for security reason. They worked properly in most party. During that time Cpanel control panel did supported FreeBSD. Later Cpanel stopped supporting FreeBSD, we switched to Linux. Since i am running


PHP can’t connect to MySQL running on localhost

On a server, PHP can’t connect to MySQL with following code, it returned error “Could not connect: Permission denied 2002” If i change “localhost” with IP address 127.0.0,1, PHP script is able to connect to MySQL server properly. If i


MySQL Configuration

Here are some of the configurations for MySQL, some of these are already set on your server. When you edit MySQL configuration file (/etc/my.cnf or /etc/mysql/my.cnf), you need to restart MySQL as it is only read when you start MySQL.