Precautions for configuring Nginx and PHP in Ubuntu

Source: Internet
Author: User
When configuring nginx and php in Ubuntu, please note that use php5-fpm in/etc/init. d/in this folder, use it to load nginx1.4 and there is no nginxstart command. /nginx can be nginx after boot if the normal loading php please check your php5-fpm.sock port and nginx set the same fastcgi_pass settings, such as different, please correct to add a l

Note the following When configuring nginx and php in Ubuntu:

Please use php5-fpm, in the/etc/init. d/folder, use him to load

Nginx start command is no longer available in nginx1.4./nginx can be used directly.

If php cannot be loaded normally after nginx is started, check whether the port of your php5-fpm.sock is the same as that set in nginx fastcgi_pass, if not, correct

Add a listen = 127.0.0.1: 9000 (9000 is the default nginx setting, and the fpm file installed under ubuntu apt-get is in/etc/php5/fpm/pool. d)

Url rewriting. Because I use the yii framework for program development, I have to add

Location /{
If (! -E $ request_filename ){
Rewrite ^/(. *)/index. php last;
}
}

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.