How to reload service by using kill command
In my case I am using apache server for reloading configuration file etc.
*Check apache is runnig on 80 port or not ?
root@indiangnu.org:/home/arun# netstat -nlp | grep 80
tcp6 0 0 :::80 :::* LISTEN 5562/apache2
root@indiangnu.org:/home/arun# vi /etc/apache2/
apache2.conf envvars magic mods-enabled/ README sites-enabled/
conf.d/ httpd.conf mods-available/ ports.conf sites-available/ ssl/
2] Modify configuration files..
root@indiangnu.org:/home/arun# cat /etc/apache2/ports.conf
Listen 80
root@indiangnu.org:/home/arun# vi /etc/apache2/ports.conf
root@indiangnu.org:/home/arun# cat /etc/apache2/ports.conf
Listen 80
Listen 8080
root@indiangnu.org:/home/arun#
root@indiangnu.org:/home/arun# netstat -nlp | grep 80
root@indiangnu.org:/home/arun# netstat -nlp | grep 80
tcp6 0 0 :::80 :::* LISTEN 5562/apache2
3] Reload service ie configuration files etc.
root@indiangnu.org:/home/arun# kill -HUP 5562
4] Check apache is using 80 and 8080 port or not ?
root@indiangnu.org:/home/arun# netstat -nlp | grep 80
tcp6 0 0 :::8080 :::* LISTEN 5562/apache2
tcp6 0 0 :::80 :::* LISTEN 5562/apache2
root@indiangnu.org:/home/arun#
Similar Posts:
- Shell script to monitor running services such as web/http, ssh, mail etc.
- HTTP and HTTPS with Apache server
- SSH tunneling – for SOCK proxy port forwarding
- HAProxy Load Balancer
- Asterisk md5secret password problem
- Apache – (28)No space left on device: Cannot create SSLMutex
- Zimbra with non 80 port ( Zimbra with 7071 and 8086 port and Apache web server on 80 port)