Showing posts with label Server Tweaks. Show all posts
Showing posts with label Server Tweaks. Show all posts

Wednesday, 6 June 2012

unable to start services

==========================================================================
Warning, could not highlight error! No parser for error message found: 2012-06-01 05:04:04 Cannot open main log file "/var/log/exim_mainlog": Permission denied: euid=47 egid=12
2012-06-01 05:04:04 Failed to get user name for uid 0
2012-06-01 05:04:04 Cannot open main log file "/var/log/exim_mainlog": Permission denied: euid=47 egid=12
exim: could not open panic log - aborting: see message(s) above

==========================================================================
When we try and access a site via cpanel, we also get the following error:
Unable read /etc/passwd. /etc/passwd MUST be world readable under UN*X operating systems

In order to get this issue resolved :

Check your / partition permission it needs to set as 755

:)

Friday, 29 July 2011

How to enable the slow query log in a cPanel/Linux server


To enable slow query log in cpanel server, you can use following steps.
Add following to following to /etc/my.cnf file on server.
# vi /etc/my.cnf

log-slow-queries=/var/lib/mysql/slow.log
After that, do the following commands to create the file with the right ownership and file permissions
# touch /var/lib/mysql/slow.log

# chmod 660 /var/lib/mysql/slow.log

# chown mysql:mysql /var/lib/mysql/slow.log
Restart the mysql server and check the logs in /var/lib/mysql/slow.log.

Friday, 22 July 2011

How to check whether your server had Mod_Rewrite enabled


Put this 3 lines in .htaccess on your site.
For cpanel user, it should be under /home/username/public_html/.htaccess
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.yahoo.com/$1 [R=301,L]
When you visit your site and it get redirect to www.yahoo.com, that mean Mod_Rewrite is enabled on the server.