Nginx and PHP installation and configuration of the three Nginx configuration file

Source: Internet
Author: User
This article to share the content is about Nginx and PHP installation and configuration of the three Nginx configuration file, has a certain reference value, the need for friends can refer to

1. Open configuration file:/usr/local/nginx-1.8.0/conf/nginx.conf

here Root is the directory that the code points to

server_name is the domain name

location/ represents a match for all URL perform a matching operation, here's a rewrite:

if (!-e $request _filename) {

Rewrite ^/(. *) $/index.php/$1 last;

}

This rewrite is a match to the URL matching the regular here is automatically added to the index.php, has helped us to automatically fill the url of the index.php function, shorten the length of our URL Access


Related recommendations:

Nginx and PHP installation and configuration one of the compiled installation nginx-1.8.0

Installation and configuration of Nginx and PHP installation and configuration two PHP-FPM

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.