diff --git a/2.Common_services/5.Nginx/vhost_skyreach.conf b/2.Common_services/5.Nginx/vhost_skyreach.conf index d2b31516d4e4ef6edbee1227c15c381edbaf5903..927f76aed822031a480720f2ccdb020dc1a9d5b7 100644 --- a/2.Common_services/5.Nginx/vhost_skyreach.conf +++ b/2.Common_services/5.Nginx/vhost_skyreach.conf @@ -52,7 +52,7 @@ server { } # APT proxy location /apt { - location ~ ^/apt/(http|https)/([\w\.\-\_]+.ubuntu.com/ubuntu|ftp.debian.org/debian|mozilla.debian.net|panel.ubicast.eu/packaging/apt)/(.*)$ { + location ~ ^/apt/(http|https)/([\w\.\-\_]+.ubuntu.com/ubuntu|ftp.debian.org/debian|mozilla.debian.net|panel.ubicast.eu)/(.*)$ { resolver 127.0.0.1; proxy_pass $1://$2/$3; proxy_cache uc-apt-cache; diff --git a/6.CampusManager/1.Install_CampusManager/0_setup.sh b/6.CampusManager/1.Install_CampusManager/0_setup.sh index 0823e5d61251692e4cd634cc233de30fdecf0346..04217e6ccc7ff8af0487161db3bfec634e7ec1d7 100755 --- a/6.CampusManager/1.Install_CampusManager/0_setup.sh +++ b/6.CampusManager/1.Install_CampusManager/0_setup.sh @@ -6,31 +6,3 @@ apt-get install -y campus-manager # configure nginx sed -i "s@server_name skyreach;@server_name ${CM_SERVER_NAME};@" /etc/nginx/sites-available/skyreach.conf service nginx restart - -# install apt cacher -apt-get install -y apt-cacher-ng -# secure it -if ( ! rgrep 'AdminAuth: admin:' /etc/apt-cacher-ng/security.conf >/dev/null ); then - APT_CACHER_PWD="$(pwgen 12)" - echo "AdminAuth: admin:${APT_CACHER_PWD}" >> /etc/apt-cacher-ng/security.conf - service apt-cacher-ng restart -fi - -# iptables rules for port 3142 -DEBIAN_FRONTEND=noninteractive apt-get install -y iptables-persistent -iptables -A INPUT -p tcp -s localhost --destination-port 3142 -j ACCEPT -iptables -A INPUT -p tcp --destination-port 3142 -j DROP -iptables-save -# the save using "service" command fails on VM -if ( rgrep '14.04' /etc/lsb-release >/dev/null ); then - update-rc.d iptables-persistent enable - service iptables-persistent save || true -else - update-rc.d netfilter-persistent enable - service netfilter-persistent save || true -fi - -LIG=$(grep -n "^iface lo inet loopback" /etc/network/interfaces | awk -F ":" '{print$1}') -LIG=$(( ${LIG} + 1 )) - -sed -i "${LIG}i\pre-up iptables-restore < /etc/iptables/rules.v4" /etc/network/interfaces