Falls memcached noch nicht auf dem System installiert ist:
1 |
apt-get install memcached php5-memcached |
Zur Kontrolle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
php -i |grep memcached /etc/php5/cli/conf.d/20-memcached.ini, memcached memcached support => enabled libmemcached version => 1.0.8 memcached.compression_factor => 1.3 => 1.3 memcached.compression_threshold => 2000 => 2000 memcached.compression_type => fastlz => fastlz memcached.serializer => php => php memcached.sess_binary => 0 => 0 memcached.sess_lock_wait => 150000 => 150000 memcached.sess_locking => 1 => 1 memcached.sess_prefix => memc.sess.key. => memc.sess.key. Registered save handlers => files user memcache memcached |
Dienste durchstarten
1 2 3 |
service php5-fpm restart php5-fpm stop/waiting php5-fpm start/running, process 12443 |
Plesk seitig unter Websites & Domains > Website > Web Server Settings unter nginx settings
Die Direktive zum kopieren.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
if (!-e $request_filename){ rewrite ^(.*)$ /index.php break; } location ~* .(js|css|png|jpg|jpeg|gif|ico|woff|svg)$ { expires 30d; add_header Pragma public; add_header Cache-Control "public"; try_files $uri @fallback; } gzip on; gzip_proxied any; gzip_types text/plain text/xml text/css application/x-javascript; gzip_vary on; gzip_disable "MSIE [1-6].(?!.*SV1)"; rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last; rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last; |