Skip to content
Snippets Groups Projects
Commit 2337b03d authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Revert APT proxy changes (refs #20417).

parent 0b5146ed
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment