Ubuntu12.04 configure nginxmysqlphp5_MySQL

Source: Internet
Author: User
Ubuntu12.04 configure nginxmysqlphp5 using tung.pdf

1. apt-get install mysql-server mysql-client // install the database

2. apt-get install nginx // install nginx

Gedit/etc/nginx/sites-enabled/default // nginx configuration file

Server {

Root/home/angelmylove/download/zendphp/; // address for storing the php file, which is equivalent to the documentRoot of apache
Index index.html index.htm index. php;
# Make site accessible from http: // localhost/
Server_name localhost;
Autoindex on; // An error occurred every time I did not write this sentence.


Location ~ /. Php $ {
# Fastcgi_split_path_info ^ (. +/. php) (/. +) $;
# NOTE: You shoshould have "cgi. fix_pathinfo = 0;" in php. ini
#
# With php5-cgi alone:
Fastcgi_pass 127.0.0.1: 9000;
# With php5-fpm:
# Fastcgi_pass unix:/var/run/php5-fpm.sock;
Fastcgi_index index. php;
Include fastcgi_params;
}

}

3. // install useful modules

Apt-get install php5-fpm php5-mysql php5-curl php5-gd php5-intl php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode

4./etc/init. d/nginx stop

/Etc/init. d/nginx start

5, serviec php5-fpm reload // execute every time you load a new module

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.