Skip to content

Instantly share code, notes, and snippets.

@overtrue
Created February 17, 2017 09:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save overtrue/f7a0cf6135e7b0704f0fa1e5b64512ed to your computer and use it in GitHub Desktop.
Save overtrue/f7a0cf6135e7b0704f0fa1e5b64512ed to your computer and use it in GitHub Desktop.
Packagist proxy template for nginx vhost.
proxy_cache_path /tmp/nginx/cache keys_zone=one:200m
loader_threshold=300 loader_files=2000;
server {
listen *:80;
client_max_body_size 100M;
server_name pkg.yourdomain.com; # YOUR HOST
charset utf-8;
location / {
proxy_cache one;
proxy_pass http://packagist.org;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment