Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx fastcgi buffers: set better default #302

Merged
merged 1 commit into from
Aug 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion roles/nginx/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
logs_root: /var/log/nginx
nginx_logs_root: /var/log/nginx
nginx_user: www-data
strip_www: true
nginx_fastcgi_buffers: 8 8k
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that URL. It says to do 32 32k which is 1MB. They don't see to understand it multiplies them.

Should add this one: https://gist.github.com/magnetikonline/11312172


# Fastcgi cache params
nginx_cache_path: /var/cache/nginx
Expand Down
5 changes: 3 additions & 2 deletions roles/nginx/templates/nginx.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ events {

# Default error log file
# (this is only used when you don't override error_log on a server{} level)
error_log {{ logs_root }}/error.log warn;
error_log {{ nginx_logs_root }}/error.log warn;
pid /run/nginx.pid;

http {
Expand All @@ -37,6 +37,7 @@ http {
server_tokens off;

# Setup the fastcgi cache.
fastcgi_buffers {{ nginx_fastcgi_buffers }}
fastcgi_cache_path {{ nginx_cache_path }} levels=1:2 keys_zone=wordpress:{{ nginx_cache_key_storage_size }} max_size={{ nginx_cache_size }} inactive={{ nginx_cache_inactive }};
fastcgi_cache_use_stale updating error timeout invalid_header http_500;
fastcgi_cache_lock on;
Expand All @@ -59,7 +60,7 @@ http {

# Default log file
# (this is only used when you don't override access_log on a server{} level)
access_log {{ logs_root }}/access.log main;
access_log {{ nginx_logs_root }}/access.log main;

# How long to allow each connection to stay idle; longer values are better
# for each individual client, particularly for SSL, but means that worker
Expand Down