Skip to content

Commit 7fe2439

Browse files
committed
change readme
typechange: nginx.conf modified: vhost/demo.conf modified: README.md deleted: lua/fastdfs.lua deleted: lua/restyfastdfs.lua
1 parent e565807 commit 7fe2439

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed

nginx.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

nginx.conf

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
user www www;
2+
worker_processes 4;
3+
worker_cpu_affinity 1000 0100 0010 0001;
4+
error_log /opt/logs/nginx/error.log error;
5+
pid /var/run/nginx.pid;
6+
worker_rlimit_nofile 65535;
7+
events
8+
{
9+
use epoll;
10+
worker_connections 65535;
11+
}
12+
http
13+
{
14+
limit_conn_zone $binary_remote_addr zone=one:10m;
15+
limit_conn_zone $server_name zone=perserver:10m;
16+
include mime.types;
17+
include fastcgi.conf;
18+
default_type application/octet-stream;
19+
charset utf-8;
20+
server_names_hash_bucket_size 128;
21+
client_header_buffer_size 32k;
22+
large_client_header_buffers 4 64k;
23+
sendfile on;
24+
autoindex off;
25+
tcp_nopush on;
26+
tcp_nodelay on;
27+
keepalive_timeout 120;
28+
29+
30+
fastcgi_connect_timeout 60;
31+
fastcgi_send_timeout 60;
32+
fastcgi_read_timeout 60;
33+
fastcgi_buffer_size 128k;
34+
fastcgi_buffers 8 128k;
35+
fastcgi_busy_buffers_size 128k;
36+
fastcgi_temp_file_write_size 128k;
37+
38+
39+
gzip on;
40+
gzip_min_length 1k;
41+
gzip_buffers 4 16k;
42+
gzip_http_version 1.0;
43+
gzip_comp_level 2;
44+
gzip_types text/plain application/x-javascript text/css application/xml;
45+
gzip_vary on;
46+
47+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
48+
'$status $body_bytes_sent "$http_referer" '
49+
'"$http_user_agent" $http_x_forwarded_for';
50+
51+
client_max_body_size 200m;
52+
53+
#lua_package_path "/etc/nginx/lua/?.lua";
54+
55+
include /etc/nginx/vhost/*.conf;
56+
}
57+

vhost/demo.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ server {
1616
content_by_lua 'ngx.say("hello, ttlsa lua")';
1717
}
1818

19-
#/thumbnail目录下的图片请求不经过缩略图模块
19+
#/thumb目录下的图片请求不经过缩略图模块
2020
location ^~ /thumb/ {
2121

2222
}
2323

24+
# 所有符合规则的图片/xx/xx/xx.jpg_100x100.jpg
2425
location ~* ^(.+\.(jpg|jpeg|gif|png))_(\d+)+x(\d+)+\.(jpg|jpeg|gif|png)$ {
2526
root $root_path; # 这里必须设置,否则根目录,即 $document_root 会是 Nginx 默认的 Nginx Root/html,在 Lua 中会得不到期望的值
2627
set $thumbnail_root $root_path/thumb;

0 commit comments

Comments
 (0)