1pid logs/nginx.pid; 2error_log logs/nginx-main_error.log debug; 3 4# Development Mode 5master_process off; 6daemon off; 7worker_processes 2; 8 9events { 10 worker_connections 1024; 11 #use kqueue; # MacOS 12 use epoll; # Linux 13} 14 15http { 16 default_type application/octet-stream; 17 18 access_log logs/nginx-http_access.log; 19 error_log logs/nginx-http_error.log debug; 20 21 proxy_cache_path /tmp/cache levels=1:2 keys_zone=zone:10m inactive=10d max_size=100m; 22 23 server { 24 listen 8080; 25 server_name localhost; 26 27 location / { 28 video_thumbextractor; 29 video_thumbextractor_video_filename $uri; 30 video_thumbextractor_video_second $arg_second; 31 video_thumbextractor_image_width $arg_width; 32 video_thumbextractor_image_height $arg_height; 33 video_thumbextractor_only_keyframe off; 34 video_thumbextractor_next_time off; 35 } 36 } 37 38 server { 39 listen 8081; 40 server_name localhost; 41 42 location / { 43 video_thumbextractor; 44 video_thumbextractor_video_filename $uri; 45 video_thumbextractor_video_second $arg_second; 46 video_thumbextractor_image_width $arg_width; 47 video_thumbextractor_image_height $arg_height; 48 49 proxy_set_header Host "static_files_server"; 50 proxy_pass http://localhost:8081; 51 52 proxy_cache zone; 53 proxy_cache_key "$uri"; 54 proxy_cache_valid 200 1m; 55 } 56 } 57 58 server { 59 listen 8081; 60 server_name static_files_server; 61 62 location / { 63 } 64 } 65 66} 67