Breaking News
Loading...
Monday, July 29, 2013

How to Configure Basic Setup for lighttpd on CentOS 6.4

3:43 PM

lighttpd is a secure, fast, compliant, and very flexible web-server that has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. This post will show you the basic lighttpd setup on CentOS 6.4. Refer to previous post to install lighttpd.
1. Configure basic lighttpd setup :
[root@centos63 ~]# vi /etc/lighttpd/lighttpd.conf
..
..
var.log_root    = "/var/log/lighttpd"
var.server_root = "/var/www"
var.state_dir   = "/var/run"
var.home_dir    = "/var/lib/lighttpd"
var.conf_dir    = "/etc/lighttpd"
..
..
server.port = 80
..
..
server.use-ipv6 = "disable"
..
..
server.document-root = server_root + "/lighttpd"
..
..
server.max-connections = 512
2. To check your lighttpd.conf for Syntax error, you can use this command, it can helps to find any misconfigurations easily:
[root@howtolinux ~]# lighttpd -t -f /etc/lighttpd/lighttpd.conf
Syntax OK
3. Start lighttpd service :
[root@howtolinux ~]# /etc/init.d/lighttpd start
Starting lighttpd:                                         [  OK  ]
4. Stop lighttpd service :
[root@howtolinux ~]# /etc/init.d/lighttpd stop
Stopping lighttpd:                                         [  OK  ]
5. Create a HTML test page and access to it with web browser :
[root@howtolinux ~]# vi /var/www/lighttpd/index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Lighttpd Test Page
</div>
</body>
</html>
 
Good Luck For You!! 

0 comments:

Post a Comment

 
Toggle Footer