AMP AMP

How to Install Lighttpd Web Server 1.4.54 Version on CentOS 7.6

Installation of Lighttpd 1.4.54 version :

Features

Flexible Virtual Hosting

Cache meta language

Conditional URL Rewriting

Pre-requisites

Epel-release repository

Installation procedure

Install the lighttpd by executing the following command.

[root@linuxhelp ~]# yum install lighttpd -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.vbctv.in
 * epel: ftp.riken.jp
 * extras: mirror.vbctv.in
 * remi-php72: remi.mirrors.arminco.com
 * remi-safe: remi.mirrors.arminco.com
 * updates: centos.myfahim.com
Resolving Dependencies
--> Running transaction check
---> Package lighttpd.x86_64 0:1.4.53-1.el7 will be installed
--> Processing Dependency: libfam.so.0()(64bit) for package: lighttpd-1.4.53-1.el7.x86_64
--> Running transaction check
---> Package gamin.x86_64 0:0.1.10-16.el7 will be installed
.
.
.
http://mirror1.ku.ac.th/fedora/epel/7/x86_64/Packages/l/lighttpd-1.4.53-1.el7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found--:--:-- ETA 
Trying other mirror.
lighttpd-1.4.53-1.el7.x86_64.r FAILED                                          
http://epel.scopesky.iq/7/x86_64/Packages/l/lighttpd-1.4.53-1.el7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Founds |    0 B  --:--:-- ETA 
Trying other mirror.
(2/2): lighttpd-1.4.53-1.el7.x86_64.rpm                                                                              | 436 kB  00:00:01     
--------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                       166 kB/s | 564 kB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : gamin-0.1.10-16.el7.x86_64                                                                                               1/2 
  Installing : lighttpd-1.4.53-1.el7.x86_64                                                                                             2/2 
  Verifying  : lighttpd-1.4.53-1.el7.x86_64                                                                                             1/2 
  Verifying  : gamin-0.1.10-16.el7.x86_64                                                                                               2/2 

Installed:
  lighttpd.x86_64 0:1.4.53-1.el7                                                                                                            

Dependency Installed:
  gamin.x86_64 0:0.1.10-16.el7                                                                                                              

Complete!

Enable the service of Lighttpd

[root@linuxhelp ~]# systemctl enable lighttpd
Created symlink from /etc/systemd/system/multi-user.target.wants/lighttpd.service to /usr/lib/systemd/system/lighttpd.service.
Start the service of Lighttpd
 [root@linuxhelp ~]# systemctl start lighttpd

Verify the status of lighttpd service

 [root@linuxhelp ~]# systemctl status lighttpd
● lighttpd.service - Lightning Fast Webserver With Light System Requirements
   Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-06-19 11:07:07 IST; 15s ago
 Main PID: 31975 (lighttpd)

Check the port number assigned to the lighttpd using netstat

[root@linuxhelp ~]# netstat -tulpn | grep lighttpd
tcp6       0      0 :::80                   :::*                    LISTEN      31975/lighttpd      

Change the doirectory to Lighttpd document root directory

 [root@linuxhelp ~]# cd /var/www

List the contents inside the www directory.

[root@linuxhelp www]# ll
total 0
drwx------ 2 lighttpd lighttpd 110 Jun 19 11:06 lighttpd

Change the directory to lighttpd

 [root@linuxhelp www]# cd lighttpd/

List the contents to view the lighttpd files and folders

 [root@linuxhelp lighttpd]# ll
total 48
-rw-r--r-- 1 root root  3638 Jan 28 21:48 favicon.ico
-rw-r--r-- 1 root root   844 Jan 28 21:48 index.html
-rw-r--r-- 1 root root  2072 Jan 28 21:48 light_button.png
-rw-r--r-- 1 root root 35431 Jan 28 21:48 light_logo.png
lrwxrwxrwx 1 root root    32 Jun 19 11:06 poweredby.png -> /usr/share/pixmaps/poweredby.png

Assign the ownership permissions to lighttpd directory as lighttpd

[root@linuxhelp lighttpd]# chown -R lighttpd. ./

Restart the service of Lighttpd web server

 [root@linuxhelp lighttpd]# systemctl restart lighttpd

Open the browser and enter localhost to view the test page of Lighttpd web server.

With this,Installation of Lighttpd web server 1.4.54 version On centOS 7.6 comes to end.

FAQ
Q
What is the main configuration file of lighttpd web server?
A
The main configuration file of lighttpd web server is /etc/lighttpd/lighttpd.conf
Q
What is the document root directory of lighttpd?
A
the document root directory of lighttpd is /var/www
Q
What does CGI mean in lighttpd?
A
The COmmon gateway Interface is a standard way for a web server which passes web user's request to an application program and gets the data from the application to the user in lighttpd.
Q
What does FASTCGI server in lighttpd?
A
FASTCGI program manages multiple CGI requests within a single proccess which saves program instructions for each request in lighttpd.
Q
What is lighttpd?
A
Lighttpd is an open source web server optimised for speed-critical environments.