{"id":2676,"date":"2012-04-02T21:52:19","date_gmt":"2012-04-02T13:52:19","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2676"},"modified":"2023-04-28T09:49:37","modified_gmt":"2023-04-28T09:49:37","slug":"how-to-install-and-configure-lighttpd-on-centos-6-2","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-and-configure-lighttpd-on-centos-6-2\/","title":{"rendered":"How to Install and Configure Lighttpd on CentOS 6.2"},"content":{"rendered":"<p>The Lighttpd is an open-source web server more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible. Lighttpd is an excellent tool for small to medium sized web sites. It is a web server for Linux\/UNIX and Windows operating systems platform and is an alternative to Apache web server. In this post, i will show on how to setup Lighttpd on linux CentOS 6.2 server.<\/p>\n<p>1. Install and configure PMforge Repository on CentOS 6.2 :<br \/>\n<a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-add-the-rpmforge-repository-on-centos-6rhel-6-linux-server\/\">How to Add the RPMforge Repository on CentOS 6\/RHEL 6 Linux Server<\/a><\/p>\n<p>2. Install lighttpd using yum command :<\/p>\n<pre>[root@centos62 ~]# yum install lighttpd -y\nLoaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * base: centos.ipserverone.com\n * extras: centos.ipserverone.com\n * rpmforge: ftp-stud.fht-esslingen.de\n * updates: centos.ipserverone.com\nSetting up Install Process\nResolving Dependencies\n--&gt; Running transaction check\n---&gt; Package lighttpd.i686 0:1.4.28-2.el6.rf will be installed\n--&gt; Finished Dependency Resolution\n\nDependencies Resolved\n\n====================================================================================================\n Package               Arch              Version                        Repository             Size\n====================================================================================================\nInstalling:\n lighttpd              i686              1.4.28-2.el6.rf                rpmforge              706 k\n\nTransaction Summary\n====================================================================================================\nInstall       1 Package(s)\n\nTotal download size: 706 k\nInstalled size: 2.6 M\nDownloading Packages:\nlighttpd-1.4.28-2.el6.rf.i686.rpm                                            | 706 kB     00:08\nRunning rpm_check_debug\nRunning Transaction Test\nTransaction Test Succeeded\nRunning Transaction\n  Installing : lighttpd-1.4.28-2.el6.rf.i686                                                    1\/1\n\nInstalled:\n  lighttpd.i686 0:1.4.28-2.el6.rf\n\nComplete!<\/pre>\n<p>3. Configure Lighttpd starts automatically when boot up :<\/p>\n<pre>[root@centos62 ~]# chkconfig --levels 235 lighttpd on<\/pre>\n<p>or<\/p>\n<pre>[root@centos62 ~]# chkconfig lighttpd on<\/pre>\n<p>4. Open \/etc\/lighttpd\/lighttpd.conf :<\/p>\n<pre>[root@centos62 ~]# vi \/etc\/lighttpd\/lighttpd.conf<\/pre>\n<p>Make sure server.use-ipv6 is set to &#8220;disable&#8221; :<\/p>\n<pre>##\n## Use IPv6?\n##\nserver.use-ipv6 = \"disable\"<\/pre>\n<p>5. The server.document-root is located at \/srv\/www\/lighttpd. Upload or create the following index.html to test your web server :<\/p>\n<pre>[root@centos62 ~]# vi \/srv\/www\/lighttpd\/index.html<\/pre>\n<p>Add this html code into index.html<\/p>\n<pre>&lt;html&gt;\n&lt;body&gt;\n&lt;div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\"&gt;\nLighttpd Test Page on CentOS 6.2\n&lt;\/div&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n<p>6. Start lighttpd :<\/p>\n<pre>[root@centos62 ~]# \/etc\/init.d\/lighttpd start\nStarting lighttpd:                                         [  OK  ]<\/pre>\n<p>7. Browser your server ip address :<br \/>\nhttp:server_ip_address<br \/>\n<img decoding=\"async\" class=\"alignnone lazyload\" title=\"Lighttpd\" data-src=\"http:\/\/3.bp.blogspot.com\/-DXKZy1ade0Q\/T3mtZKHzOpI\/AAAAAAAACOw\/ZYIoHJVhG7Q\/s1600\/1.PNG\" alt=\"Lighttpd\" width=\"627\" height=\"132\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 627px; --smush-placeholder-aspect-ratio: 627\/132;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Lighttpd is an open-source web server more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible. Lighttpd is an excellent tool for small to medium&#8230;<\/p>\n","protected":false},"author":6,"featured_media":2677,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,1161,2062],"tags":[1244,1253,2089,1975,1535,1536,1914],"class_list":["post-2676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-lighttpd","category-yum","tag-centos","tag-centos-6-2","tag-configuration","tag-install","tag-lighttpd","tag-linux","tag-web-server"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=2676"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2676\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/2677"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=2676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}