Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the CentOS lighttpd installation and website directory configuration?

Shulou Source: shulou.com Published: 2022-06-01 07:15:25 10月28日 Update

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.

Tags: Configuration directories websites communities content files more help good interesting continuous two location interest similar guys partners that is technical support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno NVidia Shulou Technology Microsoft MariaDB