drupal-with-nginx
drupal-with-nginx copied to clipboard
How to Fix nginx: [emerg] unknown no_cache variable
I'm trying to integrate this on my ubuntu server, but whenever I test nginx using nginx -t command it always return this error:
nginx: [emerg] unknown "no_cache" variable nginx: configuration file /etc/nginx/nginx.conf test failed
How to fix this one?
Are you sure that you have the apps/drupal/map_cache.conf
file? That's where that variable is defined?
Yes, there is map_cache.conf in drupal's folder. But I can't see that is was included in drupal_boost.conf. How do you call that config file?
Now I know. I should include it in nginx.conf. What I did it copy only apps/drupal folder. Because I already have nginx.conf configuration. And I only need your script to run on drupal since I also have a lot of WordPress site on this same server.
Is it necessary to use all of your config?
No just copy the line that include that file for a start and see if it fixes the problems. Bear in mind that if you want to use microcaching you need to include that line also.
I tried to use all of your config but I now received this error:
nginx: [emerg] could not build the types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 32 nginx: configuration file /etc/nginx/nginx.conf test failed
Increase that value. The date directive is commented out in nginx.conf. Uncomment it. Le 27 janv. 2014 02:37, "jaypabs" [email protected] a écrit :
I tried to use all of your config but I now received this error:
nginx: [emerg] could not build the types_hash, you should increase either types_hash_max_size: 1024 or types_hash_bucket_size: 32 nginx: configuration file /etc/nginx/nginx.conf test failed
— Reply to this email directly or view it on GitHubhttps://github.com/perusio/drupal-with-nginx/issues/150#issuecomment-33337153 .
I can't find either types_hash_max_size or types_hash_bucket_size in nginx.conf.
I found this one map_hash_bucket_size instead of types_hash_max_size or types_hash_bucket_size. I already uncomment it and increase it to 2048 without luck.
Sorry. You must be using an old version of Nginx. Anyway the directive is here. Try.
types_hash_max_size 2048;
at nginx.conf
.