You are still getting to know your new VPS and you notice that some services are not working properly any longer.

There are several of ways to check if key services on your server are up and running . This article will show two popular methods used by our support team.

Telnet:

By using a terminal window or command prompt, you can use telnet to connect to certain ports on your server to determine if those services are running and accepting connections. To telnet simply type in 'telnet domain/IP port'

The common ports used are:

IMAP: 143


POP3: 110


SMTP: 25/26 (cpanel) 25/587 (VDS Plesk)


Apache : 80

MYSQL : 3306

===

Example good:

Admins-iMac:~ $ telnet telnet domain/IP 80

Trying xx.xx.xx.xx..

Connected to telnet domain/IP

Escape character is '^]'.

 

Example bad: 

Admins-iMac:~ $ telnet domain/IP address 80

Trying xx.xx.xx.xx...

telnet: connect to address xx.xx.xx.xx: Connection refused

telnet: Unable to connect to remote host

===

To telnet other services, just replace '80' with the appropriate corresponding port to the service you are checking.

 

You can also check these services from your SSH terminal connection.  You may find this more useful as you can start any services that might not be running from the command line.

 

Apache:

To check if apache is running input the following command:

===

root@vps [/]# /etc/init.d/httpd status

===

If apache is running, you should see something like this :

root@vps [/]# /etc/init.d/httpd status
                  Apache Server Status for localhost (via ::1)

   Server Version: Apache/2.4.12 (Unix) OpenSSL/1.0.1e-fips
          mod_bwlimited/1.4
===

If Apache is not running, then you might see something more like:

root@vps [/]# /etc/init.d/httpd status

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

===

 

To start apache, simply do :

root@vps [/]# /etc/init.d/httpd start

===

 

Checking MYSQL is very similar to checking Apache.

===

If MYSQL is running, you should see:

root@vps [/]# /etc/init.d/mysql status
 SUCCESS! MySQL running (14716)

If it is not running, you will see:

root@vps [/]# /etc/init.d/mysql status
 ERROR! MySQL is not running

===

You can start MYSQL just as you can apache. Just replace 'httpd' with 'mysql'

 

 

The following email examples are based on the assumption that you are using cpanel on your VPS.

 

Checking the inbound pop3/imap  service (dovecot)

===

root@vps [/]# /etc/init.d/dovecot status
dovecot (pid  23990) is running...
===

 

Checking the outbound smtp service (exim)

===

root@vps [/]# /etc/init.d/exim status
exim (pid 23949) is running...

===

 

Starting and stopping these service are the same procedure as MYSQL and Apache.