Debian Lighttpd + MySQL + PHP

Source: Internet
Author: User
Debian Lighttpd + MySQL + PHP -- Linux Enterprise Application-Linux server application information. The following is a detailed description. I installed a new server and was ready to migrate some of the systems. I have heard that Lighttpd has excellent server performance and stability (currently there is a static resource server using nginx, but there is no traffic, can not see the effect), this time and try again.

1. Install software

Apt-get install lighttpd mysql-server php5-cgi php5-mysql

2. modify the configuration file

Add a line to the end of/etc/php5/cgi/php. ini:

Cgi. fix_pathinfo = 1

Edit/etc/lighttpd. conf and add mod_fastcgi to the server. modules field, as shown below:

Server. modules = (
"Mod_access ",
"Mod_alias ",
"Mod_accesslog ",
"Mod_fastcgi ",
"Mod_rewrite ",
)

Add the following content at the end of the/etc/lighttpd. conf file:

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

Run/etc/init. d/lighttpd restart to check whether all phpinfo operations are normal.

In addition, you must change the MySQL password:

Mysqladmin-u root password MYPASSWORD

After going back to the system and going online, let's take a look at the system pressure, hoping to make better use of it. Thanks to baoz for providing rich lighttpd configuration experience.
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.