Secure Apache and PHP from Hackers.

Solution ::-The best way to disappear the Apache and PHP versions from the visitors or attackers. If you want to hide the require information of apache server from any other suspecious people like as attacker. Please edit Apache configuration file and make the below changes into configuration file.

Access your server via root user and Open and edit httpd.conf or apache2.conf and Make Apache stop sending its version number to any visitors.
Code as below:
———————-
root@Server[~]# vi /etc/httpd/conf/httpd.conf
ServerSignature Off
ServerTokens Prod

———————-

Now, you will need to Secure the PHP configuration of the server using below steps:
———————-
root@Server[~]# vi /usr/local/lib/php.ini
expose_php = Off
display_errors = Off

———————-

I hope, it will resolve the issue.

Thank You……!!!!

Output filter: Response body too large (over limit of 1024288, total not specified)

Error ::-
If you getting the below error in the bounce back message or in logs in plesk
—————–
Remote host said: 550 Message does not pass DomainKeys requirements for domain xxxxxx.com
—————–

Solution ::-

You will need to re-enable the “sign outgoing mail” option using the below commands:
—————–
# /usr/local/psa/bin/mailserver –sign-outgoing-mail false
# /usr/local/psa/bin/mailserver –sign-outgoing-mail true
—————–

I hope, it will resolve the issue.

Thank You.…..!!!!

Output filter: Response body too large (over limit of 1024288, total not specified)

Error ::-
Getting Apache error logs messages while accessing Site URL.
————————
Error :: Output filter: Response body too large (over limit of 1022280, total not specified).
————————

Solution ::-

The error getting due to value of variables “SecResponseBodyLimit and SecRequestBodyInMemoryLimit” in mod security configuration file. Please Edit config file using below steps

————————
[root@server~]#cd /usr/local/apache/conf/
[root@server~]#vi modsec2.conf
————————

Find the variables “SecResponseBodyLimit and SecRequestBodyInMemoryLimit” and increase the value of those variables. Afre made the changes Save the config file and restart Apache service.

Thank You.…..!!!!

ERROR: PleskFatalException Domain id is undefined.

Error ::-
While making the changes in email preferences, if you receive one of the following errors in Parallels Plesk Panel (PP) Control Panel:
============
ERROR: PleskFatalException
Domain id is undefined

0: common_func.php3:146
psaerror(string \’Domain id is undefined\’)
1: mail_name_preferences.php:12

============

Solution ::-
Please check that there is enough free disk space on server.
Also, make sure that “/usr/local/psa/admin/sessions has the correct permissions as below
============
# ls -ld /usr/local/psa/admin/sessions

drwxrwx—  2 root psaadm  4096 Nov 25 19:29 /usr/local/psa/admin/sessions
============

Thank you……!!!!!!!!

How to install and uninstall nginx cpanel plugin.

Solution ::-

Please follow the below steps to Install the NginX cPanel plugin:
——————-
# cd /usr/local/src
——————-

Download the ngix admin tar file and restore as below:
——————-
# wget http://nginxcp.com/latest/nginxadmin.tar
# tar xf nginxadmin.tar
# cd publicnginx
# chmod 755 nginxinstaller
# ./nginxinstaller install
——————-

Once completed you can login to WHM >> Plugin >> NginX Admin. Here you will get a graphical interface to manage NginX.

Thank You
…..!!!

Easyache is fails and apache doesn’t start

Error ::-

While rebuilding the apache, if  it’s fails with below error :
================================
Updating Apache configuration
Updating Apache configuration
Distilled successfully
!! Executing ‘/scripts/initsslhttpd’ !!
!! Executing ‘/scripts/update_apachectl’ !!
!! Restarting ‘httpd’ … !!
!! Failed to restart Apache. !!
!! Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.
If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl.
You should run /usr/local/cpanel/scripts/ssl_crt_status as part of your troubleshooting process. Pass it –help for more details.
Also be sure to examine apache’s various log files.

!! Archiving successful build so it can be restored via –restore-archive once the httpd.conf are resolved !!
!! ‘safecopy(/usr/local/apache/etc, /usr/local/apache.ea3-buildok-confgen-failed)’ did not return true !!
!! ‘/usr/local/apache/conf/httpd.conf.1348625171’ does not exist, using ‘/usr/local/apache/conf/httpd.conf’ instead !!
!! Done Archiving successful build !!
!! Restoring original working apache !!
!! Executing ‘/scripts/initsslhttpd’ !!

================================

Solution ::-

The solution for this to resetting SSL ciphers in apache to the default setting, and run easyapache again.

Thank You…..!!!

rebuild qmail queue if it is damaged or contains a lot of spam messages? (Debian/Ubuntu)

Solution ::-
1. Add the Plesk repository into the file /etc/apt/sources.list:
——————–

# deb http://autoinstall.plesk.com/ubuntu/PSA_11.0.9 precise all

——————–

Note: The URL depends on the OS vendor (Debian/Ubuntu) and Plesk version installed on the server. Adjust these parts accordingly. The third word in the line (e.g., precise) is the name of the Debian/Ubuntu distribution, which can be obtained by running the command lsb_release -c.

2. Update the packages cache:
——————–

# apt-get update

——————–

3. Reinstall the psa-qmail package:
——————–

# apt-get install –reinstall psa-qmail

——————–
Please try the above steps to resolve the issue of spam on your plesk server, I hope it would help for you.

Thank You
…..!!!

rebuild qmail queue if it is damaged or contains a lot of spam messages.

Solution ::-
Please Note :: All current messages will be removed from the queue and cannot be restored.

1. Stop Qmail and xinetd.
——————–
# /etc/init.d/qmail stop
# /etc/init.d/xinetd stop
——————–

2. Move the current queue to another location or name.
——————–
# mv /var/qmail/queue /var/qmail/queue_back
——————–

3. Reinstall “psa-qmail” RPM to recreate qmail queue structure with the below command:
——————–
# rpm -Uvh –force psa-qmail
——————–

4. (Optional) Reinstall “drweb-qmail” RPM if you use the Dr. Web anti-virus feature which comes with Plesk.
——————–
# rpm -Uvh –force drweb-qmail
——————–

5. Start Qmail and xinetd:
——————–
# /etc/init.d/qmail start
# /etc/init.d/xinetd start
——————–

Note: You should get both the “psa-qmail” and “drweb-qmail” RPMs from the same Plesk version distributive which is installed on the server.

You can obtain the current “psa-qmail” RPM, “drweb-qmail” RPM, and Plesk build version by running the following commands on Linux systems:
——————–
# rpm -q psa-qmail
# rpm -q drweb-qmail
# rpm -q psa
——————–

Thank You.….!!!

How to configure roundcube webmail folder for directadmin email account.

var bdv_ref_pid=562243;var bdv_ref_type=’i’;var bdv_ref_option=’a’;var bdv_ref_eb=’1′;var bdv_ref_gif_id=’ref_728x90_green_ebay’;var bdv_ref_width=728;var bdv_ref_height=90; toolbar creator var vglnk = { api_url: ‘//api.viglink.com/api’, key: ‘7778c629134625146f11df068381de7a’ }; (function(d, t) { var s = d.createElement(t); s.type = ‘text/javascript’; s.async = true; s.src = (‘https:’ == document.location.protocol ? vglnk.api_url : ‘//cdn.viglink.com/api’) + ‘/vglnk.js’; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, ‘script’));

Solution ::-
In order for the roundcube to work correctly with directadmin control panel, there is several things need to be done. First will be to configure roundcube default folders settings,

>> Open the roundcube config file which located at WEBMAIL_DIR/config/main.inc.php
————————

# WEBMAIL_DIR/config/main.inc.php

————————

>> Change the line for the default folder as below:
————————
From
$rcmail_config[‘drafts_mbox’] = ‘Drafts’;
to
$rcmail_config[‘drafts_mbox’] = ‘INBOX.Drafts’;
————————

>> Do the same for spam, Sent, and Trash folder.

var vglnk = { api_url: ‘//api.viglink.com/api’, key: ‘7778c629134625146f11df068381de7a’ }; (function(d, t) { var s = d.createElement(t); s.type = ‘text/javascript’; s.async = true; s.src = (‘https:’ == document.location.protocol ? vglnk.api_url : ‘//cdn.viglink.com/api’) + ‘/vglnk.js’; var r = d.getElementsByTagName(t)[0]; r.parentNode.insertBefore(s, r); }(document, ‘script’)); >> Next, you are require to configure the folder display array, which may referring as below.
————————

$rcmail_config[‘default_folders’] = array(‘INBOX’, ‘INBOX.Drafts’, ‘INBOX.Sent’, ‘INBOX.spam’, ‘INBOX.Trash’);
————————

>> Also, make sure to enable the default folder creation referring to below line.
————————

$rcmail_config[‘create_default_folders’] = true;

————————
Please try to make the above changes in roundcube “main.inc.php” file and it should be working for you.

That’s All……!!!!!!

Awstats Error : Error is DNS Lookup (10): db_put fail!

Solution ::-
You might receive this error while checking awstats through cPanel. The reason for above error is  DNS cache file being corrupted. Please follow the below steps to resolve the issue :
————————
>> Delete the /home/cpanel_username/tmp/webalizer/dns_cache.db file.

>> Run /scripts/runweblogs username once again.
————————
Please try to check the awstats should work again for your domain.

That’s All……!!!!!!

The Blog for Linux Technical to share the information, Notes with Solution. If you want the support for your linux server you can email me as well on "worldltechnical@gmail.com".