how to uncompress memcached content via nginx? The Next CEO of Stack OverflowHow do I get PHP...

When you upcast Blindness/Deafness, do all targets suffer the same effect?

Why didn't Khan get resurrected in the Genesis Explosion?

Why is my new battery behaving weirdly?

What happened in Rome, when the western empire "fell"?

Is micro rebar a better way to reinforce concrete than rebar?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

INSERT to a table from a database to other (same SQL Server) using Dynamic SQL

Grabbing quick drinks

Is it ever safe to open a suspicious HTML file (e.g. email attachment)?

Unclear about dynamic binding

Method for adding error messages to a dictionary given a key

What flight has the highest ratio of time difference to flight time?

The exact meaning of 'Mom made me a sandwich'

Can you be charged for obstruction for refusing to answer questions?

Domestic-to-international connection at Orlando (MCO)

How to avoid supervisors with prejudiced views?

Where do students learn to solve polynomial equations these days?

A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

Make solar eclipses exceedingly rare, but still have new moons

Newlines in BSD sed vs gsed

Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?

What connection does MS Office have to Netscape Navigator?

How to invert MapIndexed on a ragged structure? How to construct a tree from rules?



how to uncompress memcached content via nginx?



The Next CEO of Stack OverflowHow do I get PHP 5.3.3 working with Nginx on CentOS 5.5?Blank Page: wordpress on nginx+php-fpmNginx gives 504 Gateway Time-out once moved to liveNginx subversion commit failurenginx php5-fpm path_info urls and root locationNGINX don't parse .php5 as .phpLaravel 4.1 on nginx routes error 404nginx rewrite throw 404 with last and breakCodeIgniter nginx rewrite rules for i8ln URL'sHow to configure nginx to serve one site from two different document root and using different php depending on URL












0















I'm using memcached to store html content ready for nginx to display but I'm getting the compressed output in the browser.



It works if I turn off compression in PHP but doubles the response time which is the key part here so ideally I'd like to keep the compression on and decompress in nginx.



Any suggestions?



Here is the conf;



worker_processes  1;

events {
worker_connections 1024;
}

http {

include /usr/local/nginx/conf/mime.types;
server {
listen 80;
server_name mydomain.com;
access_log /path/to/access/log/access_log;
error_log /path/to/error/log/error_log;
root /default/path/to/files;

location ~* .(jpg|png|gif|css|js|swf|flv|ico|html|woff|ttf|svg|htm)$ {
try_files $uri $uri/ $uri.html @notcached;
}

location ~* .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

location / {
default_type text/html;
set $enhanced_memcached_key "$server_name$request_uri";
enhanced_memcached_hash_keys_with_md5 on;
enhanced_memcached_pass memcache.local:11211;
error_page 404 = @notcached;
}

location @notcached {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /u1/live/sites/public_html/index.html;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

}
}









share|improve this question














bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • so where does the compression happen? does PHP compress the html before storing inside the memcache? what kind of compression is that? if its normal gzip, maybe you don't need to uncompress in Nginx, but just add the right headers, so the browser can decompress it for yout.

    – replay
    Feb 18 '13 at 12:38











  • Hi, I believe it's the default compression in Memcached which is apparently zlib compression. It can be turned off in PHP but as the response time trebles from displaying the compressed data and displaying the html uncompressed I'd prefer to try and decompress it first.

    – glambert
    Feb 18 '13 at 13:05
















0















I'm using memcached to store html content ready for nginx to display but I'm getting the compressed output in the browser.



It works if I turn off compression in PHP but doubles the response time which is the key part here so ideally I'd like to keep the compression on and decompress in nginx.



Any suggestions?



Here is the conf;



worker_processes  1;

events {
worker_connections 1024;
}

http {

include /usr/local/nginx/conf/mime.types;
server {
listen 80;
server_name mydomain.com;
access_log /path/to/access/log/access_log;
error_log /path/to/error/log/error_log;
root /default/path/to/files;

location ~* .(jpg|png|gif|css|js|swf|flv|ico|html|woff|ttf|svg|htm)$ {
try_files $uri $uri/ $uri.html @notcached;
}

location ~* .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

location / {
default_type text/html;
set $enhanced_memcached_key "$server_name$request_uri";
enhanced_memcached_hash_keys_with_md5 on;
enhanced_memcached_pass memcache.local:11211;
error_page 404 = @notcached;
}

location @notcached {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /u1/live/sites/public_html/index.html;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

}
}









share|improve this question














bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • so where does the compression happen? does PHP compress the html before storing inside the memcache? what kind of compression is that? if its normal gzip, maybe you don't need to uncompress in Nginx, but just add the right headers, so the browser can decompress it for yout.

    – replay
    Feb 18 '13 at 12:38











  • Hi, I believe it's the default compression in Memcached which is apparently zlib compression. It can be turned off in PHP but as the response time trebles from displaying the compressed data and displaying the html uncompressed I'd prefer to try and decompress it first.

    – glambert
    Feb 18 '13 at 13:05














0












0








0








I'm using memcached to store html content ready for nginx to display but I'm getting the compressed output in the browser.



It works if I turn off compression in PHP but doubles the response time which is the key part here so ideally I'd like to keep the compression on and decompress in nginx.



Any suggestions?



Here is the conf;



worker_processes  1;

events {
worker_connections 1024;
}

http {

include /usr/local/nginx/conf/mime.types;
server {
listen 80;
server_name mydomain.com;
access_log /path/to/access/log/access_log;
error_log /path/to/error/log/error_log;
root /default/path/to/files;

location ~* .(jpg|png|gif|css|js|swf|flv|ico|html|woff|ttf|svg|htm)$ {
try_files $uri $uri/ $uri.html @notcached;
}

location ~* .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

location / {
default_type text/html;
set $enhanced_memcached_key "$server_name$request_uri";
enhanced_memcached_hash_keys_with_md5 on;
enhanced_memcached_pass memcache.local:11211;
error_page 404 = @notcached;
}

location @notcached {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /u1/live/sites/public_html/index.html;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

}
}









share|improve this question














I'm using memcached to store html content ready for nginx to display but I'm getting the compressed output in the browser.



It works if I turn off compression in PHP but doubles the response time which is the key part here so ideally I'd like to keep the compression on and decompress in nginx.



Any suggestions?



Here is the conf;



worker_processes  1;

events {
worker_connections 1024;
}

http {

include /usr/local/nginx/conf/mime.types;
server {
listen 80;
server_name mydomain.com;
access_log /path/to/access/log/access_log;
error_log /path/to/error/log/error_log;
root /default/path/to/files;

location ~* .(jpg|png|gif|css|js|swf|flv|ico|html|woff|ttf|svg|htm)$ {
try_files $uri $uri/ $uri.html @notcached;
}

location ~* .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

location / {
default_type text/html;
set $enhanced_memcached_key "$server_name$request_uri";
enhanced_memcached_hash_keys_with_md5 on;
enhanced_memcached_pass memcache.local:11211;
error_page 404 = @notcached;
}

location @notcached {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /u1/live/sites/public_html/index.html;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_read_timeout 240;
include fastcgi_params;
}

}
}






nginx fastcgi memcached compression memcache






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 18 '13 at 12:01









glambertglambert

1




1





bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • so where does the compression happen? does PHP compress the html before storing inside the memcache? what kind of compression is that? if its normal gzip, maybe you don't need to uncompress in Nginx, but just add the right headers, so the browser can decompress it for yout.

    – replay
    Feb 18 '13 at 12:38











  • Hi, I believe it's the default compression in Memcached which is apparently zlib compression. It can be turned off in PHP but as the response time trebles from displaying the compressed data and displaying the html uncompressed I'd prefer to try and decompress it first.

    – glambert
    Feb 18 '13 at 13:05



















  • so where does the compression happen? does PHP compress the html before storing inside the memcache? what kind of compression is that? if its normal gzip, maybe you don't need to uncompress in Nginx, but just add the right headers, so the browser can decompress it for yout.

    – replay
    Feb 18 '13 at 12:38











  • Hi, I believe it's the default compression in Memcached which is apparently zlib compression. It can be turned off in PHP but as the response time trebles from displaying the compressed data and displaying the html uncompressed I'd prefer to try and decompress it first.

    – glambert
    Feb 18 '13 at 13:05

















so where does the compression happen? does PHP compress the html before storing inside the memcache? what kind of compression is that? if its normal gzip, maybe you don't need to uncompress in Nginx, but just add the right headers, so the browser can decompress it for yout.

– replay
Feb 18 '13 at 12:38





so where does the compression happen? does PHP compress the html before storing inside the memcache? what kind of compression is that? if its normal gzip, maybe you don't need to uncompress in Nginx, but just add the right headers, so the browser can decompress it for yout.

– replay
Feb 18 '13 at 12:38













Hi, I believe it's the default compression in Memcached which is apparently zlib compression. It can be turned off in PHP but as the response time trebles from displaying the compressed data and displaying the html uncompressed I'd prefer to try and decompress it first.

– glambert
Feb 18 '13 at 13:05





Hi, I believe it's the default compression in Memcached which is apparently zlib compression. It can be turned off in PHP but as the response time trebles from displaying the compressed data and displaying the html uncompressed I'd prefer to try and decompress it first.

– glambert
Feb 18 '13 at 13:05










1 Answer
1






active

oldest

votes


















0














Have you tried this? if it matches your compression algorithm, then this should help you: http://openhack.ru/nginx-patched/wiki/MemcachedGzip






share|improve this answer
























  • Hi, I did try to use this but I don't think, unless I'm mistaken, it will work when using the enhanced_memcached module, which is required so that we can use MD5s as the memcached keys.

    – glambert
    Feb 18 '13 at 14:09












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f479913%2fhow-to-uncompress-memcached-content-via-nginx%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Have you tried this? if it matches your compression algorithm, then this should help you: http://openhack.ru/nginx-patched/wiki/MemcachedGzip






share|improve this answer
























  • Hi, I did try to use this but I don't think, unless I'm mistaken, it will work when using the enhanced_memcached module, which is required so that we can use MD5s as the memcached keys.

    – glambert
    Feb 18 '13 at 14:09
















0














Have you tried this? if it matches your compression algorithm, then this should help you: http://openhack.ru/nginx-patched/wiki/MemcachedGzip






share|improve this answer
























  • Hi, I did try to use this but I don't think, unless I'm mistaken, it will work when using the enhanced_memcached module, which is required so that we can use MD5s as the memcached keys.

    – glambert
    Feb 18 '13 at 14:09














0












0








0







Have you tried this? if it matches your compression algorithm, then this should help you: http://openhack.ru/nginx-patched/wiki/MemcachedGzip






share|improve this answer













Have you tried this? if it matches your compression algorithm, then this should help you: http://openhack.ru/nginx-patched/wiki/MemcachedGzip







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 18 '13 at 13:11









replayreplay

2,712915




2,712915













  • Hi, I did try to use this but I don't think, unless I'm mistaken, it will work when using the enhanced_memcached module, which is required so that we can use MD5s as the memcached keys.

    – glambert
    Feb 18 '13 at 14:09



















  • Hi, I did try to use this but I don't think, unless I'm mistaken, it will work when using the enhanced_memcached module, which is required so that we can use MD5s as the memcached keys.

    – glambert
    Feb 18 '13 at 14:09

















Hi, I did try to use this but I don't think, unless I'm mistaken, it will work when using the enhanced_memcached module, which is required so that we can use MD5s as the memcached keys.

– glambert
Feb 18 '13 at 14:09





Hi, I did try to use this but I don't think, unless I'm mistaken, it will work when using the enhanced_memcached module, which is required so that we can use MD5s as the memcached keys.

– glambert
Feb 18 '13 at 14:09


















draft saved

draft discarded




















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f479913%2fhow-to-uncompress-memcached-content-via-nginx%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

Список ссавців Італії Природоохоронні статуси | Список |...

Українські прізвища Зміст Історичні відомості |...