The issue is because of the corrupted exim db files.
Goto /var/spool/exim/db and delete files: retry , retry.lockfile , wait-remote_smtp, wait-remote_smtp.lockfile
/etc/init.d/exim restart
Tuesday, April 26, 2011
Friday, April 15, 2011
How to block access to your server from all IP except your
If your server had CSF then do the below step
close off all UDP/TCP ports in csf.conf, then add the IP's you want to allow access to csf.allow and csf.ignore. Just make sure you add the ips BEFORE doing so or you will lock yourself out.
after that run the below command
csf -r
If you are using IPTABLES then
#The below line will DROP all incoming connections.
iptables -P INPUT DROP
#Allow specific IPs to specific ports for example port 22 for IP 1.1.1.1
iptables -A INPUT -p tcp -s 1.1.1.1 --d-port 22 -j ACCEPT
In this fashion you can add your IPs in the allow list.
close off all UDP/TCP ports in csf.conf, then add the IP's you want to allow access to csf.allow and csf.ignore. Just make sure you add the ips BEFORE doing so or you will lock yourself out.
after that run the below command
csf -r
If you are using IPTABLES then
#The below line will DROP all incoming connections.
iptables -P INPUT DROP
#Allow specific IPs to specific ports for example port 22 for IP 1.1.1.1
iptables -A INPUT -p tcp -s 1.1.1.1 --d-port 22 -j ACCEPT
In this fashion you can add your IPs in the allow list.
Thursday, April 14, 2011
CGI files showing 500 internal server in Plesk
If you getting 500 internal server while executing the CGI files then please check the error log of that particular domain
eg: /var/www/vhosts/domain.com/statistics/logs/error_log
1) The error log may be showing issue with suexec policy violation: see suexec log for more details
>> Then please check the suexec log in /etc/httpd/logs/suexec.log their you will get error like below
target uid/gid (10078/505) mismatch with directory (10078/504) or program (10078/505)
Fix: /bin/cp /usr/sbin/psa-suexec /usr/sbin/suexec
OR
cp -arf /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec
restart the Apache and try to load the cgi file.
(Reason: Plesk uses it's own suexec file and it might have been replaced by the original one that comes with standard apache package. )
2) In the error log if you getting this error : Premature end of script headers:
Fix: Make sure that the cgi-bin/ folder has the following permissions and ownership:
drwxr-x--- myuser psaserv cgi-bin
The script itself must be owned by domain FTP user but group must be 'psacln':
-rwxr-xr-x myuser psacln script.cgi
The permission should be 755 for your script.cgi file.
eg: /var/www/vhosts/domain.com/statistics/logs/error_log
1) The error log may be showing issue with suexec policy violation: see suexec log for more details
>> Then please check the suexec log in /etc/httpd/logs/suexec.log their you will get error like below
target uid/gid (10078/505) mismatch with directory (10078/504) or program (10078/505)
Fix: /bin/cp /usr/sbin/psa-suexec /usr/sbin/suexec
OR
cp -arf /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec
restart the Apache and try to load the cgi file.
(Reason: Plesk uses it's own suexec file and it might have been replaced by the original one that comes with standard apache package. )
2) In the error log if you getting this error : Premature end of script headers:
Fix: Make sure that the cgi-bin/ folder has the following permissions and ownership:
drwxr-x--- myuser psaserv cgi-bin
The script itself must be owned by domain FTP user but group must be 'psacln':
-rwxr-xr-x myuser psacln script.cgi
The permission should be 755 for your script.cgi file.
Sunday, March 13, 2011
Changing the System time having cPanel
1. Select the appropriate time zone from the /usr/share/zoneinfo directory. Time zone names are relative to that directory. (eg :- Pacific/Easter)
ls /usr/share/zoneinfo
2. Edit the /etc/sysconfig/clock text file so that it looks like this:
ZONE=”Pacific/Easter”
UTC=true
ARC=false
3. Move the following file: /etc/localtime to back
mv /etc/localtime /etc/localtime_bak
4. Create a new soft link for /etc/localtime.
ln -s /usr/share/zoneinfo/Pacific/Easter /etc/localtime
5. Set the Hardware clock by typing the following command
/sbin/hwclock –systohc
6. Verify the time by typing the command date.
ls /usr/share/zoneinfo
2. Edit the /etc/sysconfig/clock text file so that it looks like this:
ZONE=”Pacific/Easter”
UTC=true
ARC=false
3. Move the following file: /etc/localtime to back
mv /etc/localtime /etc/localtime_bak
4. Create a new soft link for /etc/localtime.
ln -s /usr/share/zoneinfo/Pacific/Easter /etc/localtime
5. Set the Hardware clock by typing the following command
/sbin/hwclock –systohc
6. Verify the time by typing the command date.
Monday, February 28, 2011
How to redirect non-SSL/HTTP requests for Mailman to SSL/HTTPS
Create a custom .htaccess file for Mailman, as seen below:
Code:
# touch /usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess
# chown -vv mailman:mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess
Enter the following contents into the custom .htaccess file:
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Code:
# touch /usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess
# chown -vv mailman:mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/.htaccess
Enter the following contents into the custom .htaccess file:
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Friday, February 25, 2011
How to change the temp directory of Mysql
Add the below line in your my.cnf file and restart the mysql
tmpdir = /path/to/mysqltempdirectory
tmpdir = /path/to/mysqltempdirectory
Friday, January 21, 2011
Unable to start apache in plesk
If you are unable to start apache in linux plesk server, and if you are getting the following error in error logs;
Unable to open logs.
First you need to verify if ulimit is set.
Try executing the command:
echo $ulimit
If it is blank or a low value, try executing the command:
ulimit -n 65536
This should fix the issue.
Showing: 1-1 of 1
Comments
03 Sep, 2008 | Brijesh - KBModerator
In order to make this change permanent we need to edit /etc/sysctl.conf and add following lines
fs.file-max = 65536
run the following command
# /sbin/sysctl -w fs.file-max=65536
As a general rules whenever you met with an error while restarting apache in a plesk server, please try to rebuild apache configuration files by running
# /usr/local/psa/admin/sbin/websrvmng -a -v
Unable to open logs.
First you need to verify if ulimit is set.
Try executing the command:
echo $ulimit
If it is blank or a low value, try executing the command:
ulimit -n 65536
This should fix the issue.
Showing: 1-1 of 1
Comments
03 Sep, 2008 | Brijesh - KBModerator
In order to make this change permanent we need to edit /etc/sysctl.conf and add following lines
fs.file-max = 65536
run the following command
# /sbin/sysctl -w fs.file-max=65536
As a general rules whenever you met with an error while restarting apache in a plesk server, please try to rebuild apache configuration files by running
# /usr/local/psa/admin/sbin/websrvmng -a -v
Subscribe to:
Posts (Atom)