1

I follow the s3fs's readme to redirect aggregated files.
It didn't work.
Got 403 error in the nginx access log.
Here is my nginx conf.

location ~* ^/(s3fs-css|s3fs-js)/(.*) {
  set $s3 '*.s3.amazonaws.com/s3fs-public';
  set $url_full  $2;


  resolver               172.16.0.23 valid=300s;
  resolver_timeout       10s;
  proxy_pass             http://$s3/$url_full;


}


if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}


location @rewrite {
  rewrite ^ /index.php last;
}


location ~* files/styles {
        try_files $uri @rewrite;
}


        location / {
                try_files $uri @rewrite;
        }


        location ~ \.(php)$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param REDIRECT_QUERY_STRING "$query_string";
                fastcgi_param  QUERY_STRING     $query_string;
                fastcgi_param  REQUEST_METHOD   $request_method;
                fastcgi_param  CONTENT_TYPE     $content_type;
                fastcgi_param  CONTENT_LENGTH   $content_length;
                include fastcgi_params;
                fastcgi_keep_conn on;
        }


        location ~ /\. {
                deny all;
        }

Browse other questions tagged or ask your own question.