Created
October 22, 2011 09:48
-
-
Save utensil/1305822 to your computer and use it in GitHub Desktop.
Apache version of https://gist.github.com/1216602, reverse proxy for rubygems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
来源:http://baoz.net/use-reves-proxy-fvck-gfw-to-gem-from-rubygem/ | |
用的apache做的反向代理,配置如下 | |
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
DocumentRoot /var/www/html | |
ServerName rubygems.org | |
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass / http://rubygems.org/ | |
ProxyPassReverse / http://rubygems.org/ | |
</VirtualHost> | |
<VirtualHost *:80> | |
DocumentRoot /var/www/html | |
ServerName production.cf.rubygems.org | |
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass / http://production.cf.rubygems.org/ | |
ProxyPassReverse / http://production.cf.rubygems.org/ | |
</VirtualHost> | |
<VirtualHost *:80> | |
DocumentRoot /var/www/html | |
ServerName production.s3.rubygems.org | |
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass / http://production.s3.rubygems.org/ | |
ProxyPassReverse / http://production.s3.rubygems.org/ | |
</VirtualHost> | |
然后hosts里再把这3个域名做到vps的ip去即可。 | |
1.1.2.84 rubygems.org | |
1.1.2.84 production.cf.rubygems.org | |
1.1.2.84 production.s3.rubygems.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment