10 11 / 2011

Check if apache is running and start it Centos

I had this problem where i could ssh and ping the centos server, however, was not able to connect to it with the browser.

Check if DNS is configured correctly:
source: http://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&order=DESC&topic_id=11989&forum=40&move=next&topic_time=1199523861
cat /etc/resolv.conf
/bin/netstat -r


Check Apache is running:
source: http://files.zend.com/help/Zend-Server-Community-Edition/before_working_with_zend_server.htm
ps -ef | grep -E 'apache2|httpd'

That will list show a long list of apache services. Only 1 item will show if its not running.

To start, my apache server from zendserver is in (/usr/local/zend/bin/)
enter: /usr/local/zend/bin/apachectl start
or ./apachectl start in that directory