Pages

Saturday, September 20, 2014

Customize your default apache page in cpanel

You just have to login to your server via ssh.
Navigate to /usr/local/apache/htdocs

    # cd /usr/local/apache/htdocs

And finaly edit the file index.html

    # nano index.html

If you list the content of /usr/local/apache/htdocs you will see that you can also modify the content of other error pages that cpanel’s apache outputs.

End you are done

How to catch spammer or Scammer in Cpanel server?


1. Open exim.conf
pico /etc/exim.conf

2) Find this;
Ctrl + W: hostlist auth_relay_hosts = *

#########################
Runtime configuration file for Exim #
#########################

3) After hostlist auth_relay_hosts = *

add the following

log_selector = +address_rewrite +all_parents +arguments +connection_reject +delay_delivery +delivery_size +dnslist_defer +incoming_interface +incoming_port +lost_incoming_connection +queue_run +received_sender +received_recipients +retry_defer +sender_on_delivery +size_reject +skip_delivery +smtp_confirmation +smtp_connection +smtp_protocol_error +smtp_syntax_error +subject +tls_cipher +tls_peerdn
4) The final result should look like this

hostlist auth_relay_hosts = *

Friday, September 19, 2014

How to redirect webmail.domain.com to domain.com/webmail?

Here is the steps:-

Make changes to zone db ( Ie /var/named/domain.com.db)
create a subdomain webmail
entry wil be like this

    ==========================
    domain.com. IN A 64.20.54.242
    localhost.domain.com. IN A 127.0.0.1
    domain.com. IN MX 0 domain.com.
    mail IN CNAME domain.com.
    www IN CNAME domain.com.
    ftp IN A 67.20.54.242
    cpanel IN A 67.20.54.242
    whm IN A 67.20.54.242
    webmail IN A 67.20.54.242
    webdisk IN A 67.20.54.242
    ======================

mod_security: Access denied eror code 403

You may get the following error in Apache logs:-

===================================================
mod_security: Access denied with code 403. Error reading request body, error code 70007:

The timeout specified has expired
===================================================
Fix:-

1. Open the Apache configuration file

root@server1 [~]#vi /usr/local/apache/conf/httpd.conf

2. Change the  Timeout value to 300

3. Restart Apache service.

root@server1 [~]# /etc/init.d/httpd restart

Issue will be fixed.

How to disable PHP functions per domain?

If you want to disable the PHP functions  for a particular  domain, just put the following entry in the .htaccess corresponding to the domain.

php_flag engine off

You may also put the following entry in the virtual host entry  in httpd.conf corresponding to the domain.

php_admin_flag engine off

Restart httpd once this is done.

Different ports used on cPanel server

Here is the list of different ports used on cPanel server:-

20 –> FTP (Inbound/Outbound,TCP/UDP)
21 –> FTP (Inbound/Outbound,TCP/UDP)
22 –>SSH (Inbound,TCP)
25 –>SMTP (Inbound/Outbound,TCP)
26 –>SMTP (Inbound/Outbound,TCP)
37 –>RDATE (Outbound,TCP)
43 –>WHOIS(Outbound,TCP)
53 –>DNS (Inbound/Outbound,TCP/UDP)
80 –>HTTP (Inbound/Outbound,TCP)
110 –> POP3(Inbound,TCP)
143 –>IMAP4(Inbound,TCP)
443 –>HTTPS(Inbound,TCP)
465 –>SMTP (TLS/SSL)(Inbound/Outbound,TCP/UDP)
873 –> RSYNC(Outbound,TCP/UDP)
993 –>IMAP4 (SSL)(Inbound,TCP)
995 –>POP3 (SSL)(Inbound,TCP)
2082 –>CPANEL(Inbound,TCP)
2083 –>CPANEL (With SSL)(Inbound,TCP)
2086 –>WHM (Inbound,TCP)
2087 –>WHM (With SSL)(Inbound,TCP)
2089 –>cPanel licence(Outbound,TCP)
2095 –>WEBMAIL(Inbound,TCP)
2096 –>WEBMAIL (With SSL)(Inbound,TCP)
3306 –>MYSQL (Inbound/Outbound,TCP)