tailieunhanh - Pro PHP Application Performance Tuning PHP Web Projects for Maximum Performance phần 8

một cấu hình thuận tiện "ra khỏi hộp," nhưng nhiều giá trị mặc định được cung cấp trong các tập tin cấu hình phân phối có thể có chi phí thực hiện mà bạn có thể tránh nếu bạn không cần các khả năng đặc biệt. Đó là một ý tưởng tốt để hiểu được bao nhiêu trong những tác phẩm "chức năng thuận tiện" | CHAPTER 7 WEB SERVER AND DELIVERY OPTIMIZATION Other Apache Configuration Tweaks The Apache web server is replete with configuration options to control every aspect of its behavior. The default delivery configuration of Apache is designed to provide a convenient configuration out of the box but many of the defaults delivered in the distribution configuration files may have performance costs that you can avoid if you don t need the particular capability. It is a good idea to understand how many of these convenience functions work at the request level so that you can determine their impact on the performance of your application and whether you should avoid the use of the functions provided. Using .htaccess Files and AllowOverride In Chapter 3 you saw how the use of the require_once function introduced extra calls to the operating systems Istat function slowing down delivery of pages. A similar overhead exists with enabling the AllowOverride directive to allow the use of .htaccess files. .htaccess files are sort of per request patches to the main Apache configuration which can be placed in any directory of your application to establish custom configurations for the content stored at that location and the directories below it. AllowOverride instructs Apache to check the directory containing the script or file it is intending to serve and each of its parent directories for the existence of an .htaccess file that contains the additional Apache configuration directives affecting this current request. However if AllowOverride has been enabled then even if you are not using .htaccess files this check is still made to determine if the .htaccess file is present incurring multiple operating system call overheads. If you are using .htaccess files then consider moving the configuration directives into the main Apache configuration file which is loaded once only when the HTTP server is started up or a new HTTPD client is started instead of on every request. If you need to .

TỪ KHÓA LIÊN QUAN