How to run multiple PHP sites using the same APC cache?

Well, the situation is that I have several php sites that all work on the same server using the same CMS. There are no changes in the base code or modules for CMS between sites, so I would like all sites to use the same code repository in order to simplify the work of all sites running on the same version.

This part easily handles the use of symbolic links, but ideally I would like the files to be cached by APC only once, so the main code is already cached for all sites.

Setup is PHP 5.2, APC, apache.

Unaware of APC, I assume that the path is from a symbolic link, so they appear as different files between sites. With the CMS on my last assignment, he used the pointer files to include the main code, but would like to avoid this because it is dirty and makes it difficult to maintain. Another question is whether different sites can use the same cache. When searching for this problem, I noticed problems with fastcgi that cannot be shared between processes.

Any help would be greatly appreciated.

+3
source share
1 answer

, , , - , cms 100 , . , cms , . , , , , . VPS, .

0

Source: https://habr.com/ru/post/1763687/


All Articles