If you use APACHE to configure multiple sites, can you set files to be preloaded for each site separately?
Source: Internet
Author: User
If you use APACHE to configure multiple sites, can you set the files to be preloaded for each site? Site A needs to be preloaded & nbsp; tt. phpB site needs to be preloaded & nbsp; ss. phpc sites do not need to be preloaded with APACHE to configure multiple sites. can I set the files to be preloaded for each site separately?
Site A needs to pre-load tt. php
Site B needs to be preloaded with ss. php
The c site does not need to be pre-loaded and shared:
------ Solution --------------------
You can specify different php. INI files for each site, and modify the configuration option auto_prepend_file to specify the files to be preloaded for php. But I have never tried it, so I am not sure if there will be any obstacles.
See http://www.php.net/manual/zh/ini.core.php#ini.auto-prepend-file
------ Solution --------------------
To preload a file, configure the auto_prepend_file entry in php. ini.
In the entry file, you can use $ _ SERVER ['http _ host'] and $ _ SERVER ['php _ SELF '] to determine the file to be loaded.
------ Solution --------------------
Specify different php. INI files for each siteThere are technical problems, usually php must be run in cgi mode
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