diff --git a/2.Common_services/5.Nginx/vhost_skyreach.conf b/2.Common_services/5.Nginx/vhost_skyreach.conf index 51bbed1ce404f006b6b9be6ddc9eb775dc73710b..039f20ffd4b7943dec779854a64fde955068e49c 100644 --- a/2.Common_services/5.Nginx/vhost_skyreach.conf +++ b/2.Common_services/5.Nginx/vhost_skyreach.conf @@ -40,43 +40,14 @@ server { include /etc/nginx/uwsgi_params; } - # Old APT proxy urls + # APT proxy urls location /fr.archive.ubuntu.com/ubuntu { - rewrite ^/(.*)$ /apt/http/$1?; + proxy_pass http://127.0.0.1:3142; } location /security.ubuntu.com/ubuntu { - rewrite ^/(.*)$ /apt/http/$1?; + proxy_pass http://127.0.0.1:3142; } location /old-releases.ubuntu.com/ubuntu { - rewrite ^/(.*)$ /apt/http/$1?; - } - # APT proxy - location /apt { - location ~ ^/apt/(http|https)/([\w\.\-\_]+.ubuntu.com/ubuntu|ftp.debian.org/debian|panel.ubicast.eu)/(.*)$ { - resolver 127.0.0.1; - proxy_pass $1://$2/$3; - proxy_cache uc-apt-cache; - # do not consider secure urls as new files - proxy_cache_key $scheme$proxy_host$uri; - # only one request at a time will be allowed to populate a new cache element - proxy_cache_lock on; - # how long should the data be kept in the cache - proxy_cache_valid 200 7d; - # instruct browser to cache this - expires 7d; - # headers - proxy_ignore_headers "Cache-Control" "X-Accel-Expires" "Expires"; - add_header X-Cache $upstream_cache_status; - } - } -} - -server { - # Replacement of apt-cacher-ng - listen 3142; - - location / { - resolver 127.0.0.1; - proxy_pass http://{{ server_name }}/apt/$scheme/$host$request_uri; + proxy_pass http://127.0.0.1:3142; } }