小编Res*_*nde的帖子

Magento的Nginx + PHP-FPM + FastCGI缓存配置

你们中的一些人可能已经注意到几天前由Magento发布的最近的Optimizing Magento For Peak Performance白皮书.虽然它主要是为EE用户编写的,但我相信我们也可以使用社区版的大部分技巧.

读完后,我继续将他们建议的Nginx + fastcgi /代理缓存配置与Magento的标准虚拟主机配置合并,并进行了一些小的改进.这是我想出的:

fastcgi_cache_path /tmp/fcgi levels=1:2 keys_zone=MAGE:64m max_size=128m inactive=10h;

server {
listen  99999; ## Nginx port
server_name  domain.com www.domain.com;
root  /www/magento; ## App folder
index  index.php;

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    expires  max;
    access_log  off;
    log_not_found  off;
}

location /index {
    try_files  $uri @fcgi_nocache;
}

location /checkout {
    try_files  $uri @fcgi_nocache;
}

location / {
    try_files  $uri @fcgi_cache;
    if ($cookie_frontend) { return 413; }
    if ($cookie_CUSTOMER_AUTH) { return 413; }
    if ($request_method = …
Run Code Online (Sandbox Code Playgroud)

php caching fastcgi nginx magento

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

caching ×1

fastcgi ×1

magento ×1

nginx ×1

php ×1