Drug preguntas

Apache starting trouble ?????

Apache No Comments »

I have encountered some common apache starting troubles regularly. This will help you fix that issue.

1)Perl process listening on port 80 and 443

If any other process listening on port 80 and 443 apache won’t start.To check  port 80 and 443 running for another process.

lsof -i TCP:80 | awk ‘{print $2}’ |xargs kill -9
lsof -i TCP:443 | awk ‘{print $2}’ |xargs kill -9

So kill those process first.

root@server204: lsof -i TCP:80 | grep perl | awk ‘{print $2}’ |xargs kill -9

root@server204: lsof -i TCP:443 | grep perl | awk ‘{print $2}’ |xargs kill -9

Then start apache

#/etc/init.d/httpd start

2)Semaphore issue.

Sometimes semaphores will cause trouble. To kill those semaphore,

ipcs -s | grep nobody | perl -e ‘while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}’

and start apache

#/etc/init.d/httpd start

Also if your log rotates are not working, apache will give internal server error. Make sure that log rotates working fine or delete the log files manaully from

/usr/local/apache/logs

/usr/local/apache/domlogs

How to Kill Zombie Process in server??

Cpanel No Comments »

This command will be useful to kill php zombie process.

ps -ef | grep mailnull | grep -v grep | awk ‘{print “kill -9″, $2}’ | sh

replace mailnull with particular proces name which has zombie

It workzz!!!!

PHP URL Redirect.

PHP No Comments »

To redirect the site using php, add these lines into index.php

<?php

header( ‘Location: http://www.yoursite.com/new_page.html’ ) ;
?>

Replace yoursite.com/new_page.html with your destination site URL.

Wordpress Themes by Natty WP. Web Hosting
Images by our golf tips desEXign.