Easy to set up nginx+php server application in Ubuntu Linux system _linux

Source: Internet
Author: User
Tags php server

Similar to the installation of other software, the installation process is basically a fool-like

  Install Nginx, execute the following command, and quickly complete

sudo apt-get install Nginx

Configuration file default installation location:


  Installing the PHP-CGI module

sudo apt-get install php5-cgi

Configuration file default installation location:

CGI config:/usr/bin/cgi/php.ini

Here is a point to note, be sure to modify the php.ini file Cgi.fix_pathinfo data is 1, the default is 0 cgi.fix_pathinfo=1; This allows the php-cgi to normally use the script_filename variable.

  Install spawn-fcgi

If the system does not have the GCC compilation environment installed, you just need to install the Build-essential Toolkit before installing LIGHTTPD, and execute the following command:

sudo apt-get install build-essential
wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.gz
TAR-XVF lighttpd-1.4.19.tar.gz
CD lighttpd-1.4.19/
sudo apt-get install Libpcre3-dev
sudo cp src/spawn-fcgi/usr/local/bin/spawn-fcgi

  Start fast_cgi:

Spawn-fcgi-a 9000-c 5-u www-data-g www-data-f

  Start Nginx

Sudo/etc/init.d/nginx start

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.