Install Lighttpd in Ubuntu9.10 to support PHP and MySQL

Source: Internet
Author: User
Install Lighttpd in Ubuntu9.10 to support PHP and MySQL. Lighttpd is a reliable, fast, and standard-compliant web server. This tutorial teaches you how to install Lighttpd in Ubuntu and supports PHP5 (FastCGI) and MySQL. First, make sure you log on to the system with the root account. All the following steps are performed by the root user. 1. To install MySQL, first install mysql5: Aptitude.

Install Lighttpd in Ubuntu 9.10 to support PHP and MySQL. Lighttpd is a reliable, fast, and standard-compliant web server. This tutorial teaches you how to install Lighttpd in Ubuntu and supports PHP5 (FastCGI) and MySQL.

First, make sure you log on to the system with the root account. All the following steps are performed by the root user.

1. Install MySQL
First, install mysql5 as follows:
Aptitude install mysql-server mysql-client
You need to set a password for the mysql root User.

2. Install Lighttpd
Lighttpd is a Ubuntu package, so we can install it like this:
Aptitude install lighttpd
Enter your local IP address in the browser to view the Lighttpd page.
In ubuntu, the root directory of the Lighttpd file is/var/www by default, and the configuration file is in/etc/lighttpd. conf. The additional configuration file is stored in the/etc/lighttpd/conf-available Directory. You can enable it with lighttpd-enable-mod or use lighttpd-disable-mod to disable it.

3. Install php5
We make php5 work in Lighttpd through FastCGI. Ubuntu provides the following package:
Aptitude install php5-cgi

4. Configure Lighttpd and php5
To enable php5 in Lighttpd, you must add a line under the/etc/php5/cgi/php. ini configuration file:
Cgi. fix_pathinfo = 1
To enable fastcgi (stored in/etc/lighttpd/conf-available/10-fastcgi.conf), run the following command:
Lighttpd-enable-mod fastcgi
Then create a link/etc/lighttpd/conf-enables/10-fastcgi.conf pointing to/etc/lighttpd/conf-available/10-fastcgi.conf
Reload Lighttpd:
/Etc/init. d/lighttpd force-reload

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.