Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

(Setup: Drupal 6.20, Boost 1.18, Nginx 0.7.67)

When the URL of the boosted node contain character or 中国新闻网新闻中心, the node is correctly cached in the cache directory, and correctly reflecting the URL.

But when accessing the node, the uncached node loaded instead.

Below is the Nginx rules I use:

server {
    server_name *.com *.net *.org;
    location / {
        root   /var/www/html/$host;
        index  index.php;
        set $boost "";
        set $boost_query "_";
        if ( $request_method = GET ) {
          set $boost G;
        if ($http_cookie !~ "DRUPAL_UID") {
          set $boost "${boost}D";
        if ($query_string = "") {
          set $boost "${boost}Q";
        if ( -f $document_root/cache/normal/$host$request_uri$boost_query.html ) {
          set $boost "${boost}F";
        if ($boost = GDQF){
          rewrite ^.*$ /cache/normal/$host/$request_uri$boost_query.html break;
        if (!-e $request_filename) {
          rewrite  ^/(.*)$  /index.php?q=$1  last;
    location ~ \.php$ {
            fastcgi_index   index.php;
            fastcgi_param   SCRIPT_FILENAME /var/www/html/$host$fastcgi_script_name;
            include         fastcgi_params;

I've tried adding charset utf-8; under http { and under server {. Both of them not works.

share|improve this question
up vote 1 down vote accepted

Try using $uri instead of $request_uri in your ifs. $request_uri is unprocessed, so % encoded entities are still encoded. $uri has been decoded, which may be what you need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.