Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
blog:apt-cacher-ng [2015/05/08 12:04]
shaun [packages.linuxdeepin.com]
blog:apt-cacher-ng [2017/04/16 09:49] (current)
shaun [Apache]
Line 114: Line 114:
 <​VirtualHost *:80> <​VirtualHost *:80>
         ServerName archive.ubuntu.com         ServerName archive.ubuntu.com
-        ServerAlias *.archive.ubuntu.com security.ubuntu.com archive.canonical.com extras.ubuntu.com download.virtualbox.org ppa.launchpad.net +        ServerAlias *.archive.ubuntu.com security.ubuntu.com archive.canonical.com extras.ubuntu.com download.virtualbox.org ppa.launchpad.net ​packages.linuxdeepin.com images.linuxcontainers.org ports.ubuntu.com 
 + 
         #Logging         #Logging
         ErrorLog /​var/​log/​apache2/​apt-cache-ng-error.log         ErrorLog /​var/​log/​apache2/​apt-cache-ng-error.log
         CustomLog /​var/​log/​apache2/​apt-cache-ng-access.log combined         CustomLog /​var/​log/​apache2/​apt-cache-ng-access.log combined
 + 
         #Enable the rewrite engine         #Enable the rewrite engine
         RewriteEngine On         RewriteEngine On
 + 
         #Preserve the "​host"​ header for requests being proxied         #Preserve the "​host"​ header for requests being proxied
-        ProxyPreserveHost On+        ​#ProxyPreserveHost On 
 +  
 +        #Proxy all requests to the local apt-cacher-ng daemon 
 +        #​RewriteRule ^(.*)$ http://​127.0.0.1:​3142$1 [L,P] 
 + RewriteRule ^(.*)$ http://​%{HTTP_HOST}$1 [P]
  
-        #Proxy all requests to the local apt-cacher-ng daemon + ProxyRemote * http://​127.0.0.1:​3142
-        RewriteRule ^(.*)$ http://​%{HTTP_HOST}$1 [P] +
-         +
-        ​ProxyRemote * http://​127.0.0.1:​3142+
 </​VirtualHost>​ </​VirtualHost>​
 </​code>​ </​code>​