Zim3r Asked: 2012-09-18 09:23:06 +0800 CST2012-09-18 09:23:06 +0800 CST 2012-09-18 09:23:06 +0800 CST 哪个缓存系统与 mpm_worker 和 mod_fcgid 一起工作? 772 我计划基于 mpm_worker 和 mod_fcgid 为我的 Apache 服务器使用 APC,但我发现 APC 和 xCache 不适用于 mod_fcgid。所以你有什么建议? apache-2.2 1 个回答 Voted Best Answer Andrew Smith 2012-09-18T12:54:21+08:002012-09-18T12:54:21+08:00 以下对我来说效果很好。这是一个单一的过程,但它与例如两个一起工作稳定。 httpd.conf: LoadModule fcgid_module modules/mod_fcgid.so AddHandler fcgid-script fcg fcgi fpl FcgidIPCDir /var/run/mod_fcgid FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm DefaultMaxClassProcessCount 1 FcgidMaxProcesses 1 FcgidMaxRequestsPerProcess 1000 php5.fcgi: #!/bin/bash PHPRC=$PWD/../etc/php5 export PHPRC umask 022 export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=99999 export PHP_FCGI_MAX_REQUESTS SCRIPT_FILENAME=$PATH_TRANSLATED export SCRIPT_FILENAME exec /usr/bin/php-cgi php.ini: 扩展=apc.so apc.enabled = 1 apc.shm_segments = 1 apc.shm_size = 512M apc.num_files_hint = 1000 apc.user_entries_hint = 4096 apc.ttl = 0 apc.user_ttl = 0 apc.gc_ttl = 3600 apc.cache_by_default = 1 apc.filters = "apc\.php$" apc.mmap_file_mask = "/tmp/apc.XXXXXX" apc.slam_defense = 0 apc.file_update_protection = 2 apc.enable_cli = 0 apc.max_file_size = 10M apc.use_request_time = 1 apc.stat = 1 apc.write_lock = 1 apc.report_autofilter = 0 apc.include_once_override = 0 apc.localcache = 0 apc.localcache.size = 256M apc.coredump_unmap = 0 apc.stat_ctime = 0 apc.canonicalize = 1 apc.lazy_functions = 1 apc.lazy_classes = 1
以下对我来说效果很好。这是一个单一的过程,但它与例如两个一起工作稳定。
httpd.conf:
php5.fcgi:
php.ini:
扩展=apc.so