LIGHTTPD Web Server installation and configuration method under CentOS _linux

Source: Internet
Author: User
Tags server installation and configuration centos
Os:centos Release 5.5
lighttpd:1.4.28
Installation
sudo yum install lighttpd.i386 lighttpd-fastcgi.i386 lighttpd-mod_mysql_vhost.i386
Run
Check configuration file
Lighttpd-t-F lighttpd.conf

Start the LIGHTTPD service
Lighttpd-d-F lighttpd.conf

End LIGHTTPD Service
CTRL + C
Or use Linux's system service to start stop LIGHTTPD service
/ETC/INIT.D/LIGHTTPD Start/stop/restart
Test
Create a file index.html in the/SRV/WWW/LIGHTTPD directory, which reads as follows:
Hello lighttpd!
Then visit: http://localhost/index.html
Configuring PHP Support
Edit the/etc/lighttpd/modules.conf file to remove the comments in front of the line
Include "conf.d/fastcgi.conf"
Edit the/etc/lighttpd/conf.d/fastcgi.conf file and add the following line
Copy Code code as follows:

Fastcgi.server = (". php" =>
("localhost" =>
(
"Socket" => "/tmp/php-fastcgi.socket",
"Bin-path" => "/usr/bin/php-cgi"
)
)
)

Create a file test.php in the/SRV/WWW/LIGHTTPD directory, which reads as follows:
Copy Code code as follows:

?
Phpinfo ();
?>

Then visit: http://localhost/test.php
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.