Providing Nginx Webserver configuration steps on FreeBSD

This commit is contained in:
byteworkshosting
2013-03-12 12:03:47 +01:00
parent 877add851b
commit c7eccd6086
2 changed files with 96 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
### Nginx configuration file ###
daemon on;
user www www;
worker_processes 4;
error_log /var/log/nginx/nginx.log crit;
pid /var/run/nginx.pid;
events {
use kqueue;
worker_connections 64;
accept_mutex_delay 50ms;
}
http {
access_log /var/log/nginx/access.log;
include mime.types;
default_type application/octet-stream;
charset utf-8;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
# Open File Cache
open_file_cache max=512 inactive=20m;
open_file_cache_valid 60s;
open_file_cache_errors on;
# FastCGI Cache
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_path /var/tmp/nginx levels=1:2 keys_zone=cache:10m inactive=20m max_size=12m;
fastcgi_temp_path /var/tmp/nginx 1 2;
fastcgi_cache cache;
fastcgi_cache_valid 200 20m;
fastcgi_cache_valid 301 302 304 1h;
fastcgi_cache_valid any 1m;
fastcgi_cache_use_stale error timeout invalid_header http_500;
# SSL
#ssl_client_certificate /path/to/example.pem;
#ssl_crl /path/to/example.crl;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH;
ssl_prefer_server_ciphers on;
ssl_session_cache builtin:256 shared:SSL:64k;
ssl_session_timeout 20m;
# GZip
gzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_static on;
include /usr/local/etc/nginx/conf.d/*.conf;
}