Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the CentOS lighttpd installation and website directory configuration?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to install CentOS lighttpd and how to configure the website directory. The content is very detailed. Interested friends can use it for reference. I hope it will help you.

The CentOS community continues to merge with other communities of its kind, making CentOS Linux the most widely used RHEL-compatible version. CentOS Linux is no less stable than RHEL. The deficiency is the lack of technical support, because it is a free version released by the community.

CentOS lighttpd installation

Wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.gz

Tar zxvf lighttpd*

Cd lightt*

. / configure

CentOS lighttpd installation says that pcre-devel is missing at this time.

Yum install pcre-devel

. / configure-- with-pcre

Make

Make install

It is much more convenient to install with apt-get install lighttpd under ubuntu, and CentOS lighttpd installation has to be configured on its own.

Cp doc/sysconfig.lighttpd / etc/sysconfig/lighttpd

Mkdir / etc/lighttpd

Then copy the default configuration file

Cp doc/lighttpd.conf / etc/lighttpd/lighttpd.conf

Cp doc/rc.lighttpd.redhat / etc/init.d/lighttpd

Then use whereis lighttpd to find the location at / usr/local/sbin/lighttpd

Before using vim / etc/init.d/lighttpd, find the prog= "lighttpd" section, comment out the default, and add:

Lighttpd= "/ usr/local/sbin/lighttpd"

Mkdir lighttpd under / var/log/, and create two more files, access.log and error.log

The default site directory configuration is:

Server.document-root = "/ srv/www/htdocs/"

Done:)

Configure reverse proxy: http://www.coolcode.cn/?action=tags&item=Linux

I took a look at access.log and suddenly found something interesting:

192.168.1.100 192.168.1.106-[14/Jul/2008:19:29:43 + 0800] "GET / HTTP/1.1" 304

0 "-" Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .n

ET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.5.30428; Zune 2.5) "

Zune 2.5 is also in Request head. I haven't noticed this all the time.

About the CentOS lighttpd installation and website directory configuration is how to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report