Skip to content

Instantly share code, notes, and snippets.

@overtrue
Last active September 4, 2016 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save overtrue/6be4e56efcb77c42e199 to your computer and use it in GitHub Desktop.
Save overtrue/6be4e56efcb77c42e199 to your computer and use it in GitHub Desktop.
小脚本与配置文件
# 缓存
proxy_cache_path /tmp/nginx/cache keys_zone=one:5m
loader_threshold=300 loader_files=2000;
server {
listen *:80; #换成你的IP地址
client_max_body_size 100M;
server_name YOUR_DOMAIN.COM; #换成你的域名
charset utf-8;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
charset on;
}
location / {
proxy_cache one;
proxy_pass http://packagist.org;
}
access_log /var/log/nginx/YOUR_DOMAIN.COM.access.log; #换成你的域名
error_log /var/log/nginx/YOUR_DOMAIN.COM.error.log; #换成你的域名
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment