Server Topic
   >  Introduction to Webservers
   >  Installing the Webserver
   >  Controlling the Webserver
   >  Installing PHP Support
   >  Using PHP
   >  Installing mySQL Database
   >  Using mySQL

 

Stopping and Starting the Lighttpd Webserver

Starting the Lighttpd Webserver

The lighttpd webserver can be started from the command line with the command:

lighttpd -f <Configuration file to use> &

For example:

lighttpd -f /var/www/conf/webSrv.conf  &

Note: to see all the command line options, type lighttpd --help

If you are running the webserver in the background as a daemon, you can start the service using the command:

sudo service lighttpd start

Stopping the Lighttpd Webserver

If you are running the webserver in the background as a daemon, you can stop the service using the command:

sudo service lighttpd stop

If this fails - or you are not running the webserver as a service - you can use the kill command. First, find the PID that the webserver is running as:

$ ps -ef | grep lighttpd
root      1188     1  0 08:51 ?        00:00:00 /usr/sbin/lighttpd -f  /var/www/conf/webSrv.conf
fredb    4649  3986  0 10:44 pts/0    00:00:00 grep --color=auto lighttpd
$ 

Next, use the kill command to stop that PID:

sudo kill <PID>
$ sudo kill 1188
$

References and Further Reading:


HomeSite IndexDesktop GuideServer GuideHints and TipsHardware CornerVideo SectionContact Us

 sitelock verified Firefox Download Button