Introduction to the organization of NGINX+PHP-FPM configuration Files _php Tutorial

Source: Internet
Author: User
configuration file path for 1.nginx
In general, when installing Nginx, the default path for the configuration file is/usr/local/nginx/conf/nginx.conf.
We can use a link file to point the Conf directory to a specific directory for easy administration. For example, the author's company likes to centralize all server configuration files in/home/server_config, then create a new subdirectory in that directory Nginx, and then point/usr/local/nginx/conf through the linked file to/home/server _config/nginx.

configuration file path for 2.Virtual host
Usually, the author's company will write each virtualhost configuration file as a separate file. These stand-alone files are independent of each other in different projects.

But there is a trick that we can build a subdirectory in the directory where the nginx.conf is located, in the Include directory, a series of linked files that point to the VirtualHost configuration file.

configuration file path for 3.PHP-FPM
Typically, the PHP-FPM executable file is in the Sbin directory under the PHP installation path. (Here, there is a digression, when installing PHP, the installation directory is generally default to/usr/local, this is not a good choice, because sometimes, a server may need to have multiple versions of PHP at the same time.) A good implementation is to have different versions of PHP installed in/usr/local/php-xxx/, xxx for PHP version).
The PHP-FPM configuration file is placed by default in the ETC directory under the PHP installation path. In fact, the PHP-FPM configuration file can specify a path when the PHP-FPM is started, and different php-fpm instances can specify a different configuration file. And this also has practical significance: in a server nginx may simultaneously listen to multiple virtualhost, when restarting a host, simply restart the corresponding PHP-FPM instance.

4. Configuration file path for each pool
You can specify it yourself. But in general, we will manage it centrally. The author of the company chose to put it under the/var/run, and for each instance to build a folder, in addition to the folder PHP-FPM, but also put the corresponding PID file, as well as the corresponding Unix:socket file.

http://www.bkjia.com/PHPjc/326133.html www.bkjia.com true http://www.bkjia.com/PHPjc/326133.html techarticle 1.nginx Profile path in general, when installing Nginx, the default path for the configuration file is/usr/local/nginx/conf/nginx.conf. We can use a link file that will conf ...

  • 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.