mirror of
https://github.com/yanue/nginx-lua-GraphicsMagick.git
synced 2025-11-26 23:35:33 +08:00
change readme
typechange: nginx.conf modified: vhost/demo.conf modified: README.md deleted: lua/fastdfs.lua deleted: lua/restyfastdfs.lua
This commit is contained in:
@@ -1 +0,0 @@
|
||||
/usr/local/nginx/conf/nginx.conf
|
||||
57
nginx.conf
Normal file
57
nginx.conf
Normal file
@@ -0,0 +1,57 @@
|
||||
user www www;
|
||||
worker_processes 4;
|
||||
worker_cpu_affinity 1000 0100 0010 0001;
|
||||
error_log /opt/logs/nginx/error.log error;
|
||||
pid /var/run/nginx.pid;
|
||||
worker_rlimit_nofile 65535;
|
||||
events
|
||||
{
|
||||
use epoll;
|
||||
worker_connections 65535;
|
||||
}
|
||||
http
|
||||
{
|
||||
limit_conn_zone $binary_remote_addr zone=one:10m;
|
||||
limit_conn_zone $server_name zone=perserver:10m;
|
||||
include mime.types;
|
||||
include fastcgi.conf;
|
||||
default_type application/octet-stream;
|
||||
charset utf-8;
|
||||
server_names_hash_bucket_size 128;
|
||||
client_header_buffer_size 32k;
|
||||
large_client_header_buffers 4 64k;
|
||||
sendfile on;
|
||||
autoindex off;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 120;
|
||||
|
||||
|
||||
fastcgi_connect_timeout 60;
|
||||
fastcgi_send_timeout 60;
|
||||
fastcgi_read_timeout 60;
|
||||
fastcgi_buffer_size 128k;
|
||||
fastcgi_buffers 8 128k;
|
||||
fastcgi_busy_buffers_size 128k;
|
||||
fastcgi_temp_file_write_size 128k;
|
||||
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_buffers 4 16k;
|
||||
gzip_http_version 1.0;
|
||||
gzip_comp_level 2;
|
||||
gzip_types text/plain application/x-javascript text/css application/xml;
|
||||
gzip_vary on;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" $http_x_forwarded_for';
|
||||
|
||||
client_max_body_size 200m;
|
||||
|
||||
#lua_package_path "/etc/nginx/lua/?.lua";
|
||||
|
||||
include /etc/nginx/vhost/*.conf;
|
||||
}
|
||||
|
||||
@@ -16,11 +16,12 @@ server {
|
||||
content_by_lua 'ngx.say("hello, ttlsa lua")';
|
||||
}
|
||||
|
||||
#/thumbnail目录下的图片请求不经过缩略图模块
|
||||
#/thumb目录下的图片请求不经过缩略图模块
|
||||
location ^~ /thumb/ {
|
||||
|
||||
}
|
||||
|
||||
# 所有符合规则的图片/xx/xx/xx.jpg_100x100.jpg
|
||||
location ~* ^(.+\.(jpg|jpeg|gif|png))_(\d+)+x(\d+)+\.(jpg|jpeg|gif|png)$ {
|
||||
root $root_path; # 这里必须设置,否则根目录,即 $document_root 会是 Nginx 默认的 Nginx Root/html,在 Lua 中会得不到期望的值
|
||||
set $thumbnail_root $root_path/thumb;
|
||||
|
||||
Reference in New Issue
Block a user