From ceaa417fad1acc400c610f17e2e59852aa5fe209 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 8 Dec 2012 15:34:53 +0100 Subject: allow certain params only from alioth (token is used to trigger builds) --- etc/apache2/sites-available/jenkins.debian.net | 9 ++++++++- update_jdn.sh | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/etc/apache2/sites-available/jenkins.debian.net b/etc/apache2/sites-available/jenkins.debian.net index c26de24d..ddd739ee 100644 --- a/etc/apache2/sites-available/jenkins.debian.net +++ b/etc/apache2/sites-available/jenkins.debian.net @@ -21,13 +21,20 @@ Allow from all + # allow certain params only from alioth (token is used to trigger builds) + RewriteEngine on + RewriteCond %{REMOTE_ADDR} !217\.196\.43\.140 + #RewriteCond %{REMOTE_HOST} !.*.debian.org + RewriteCond %{QUERY_STRING} token + RewriteRule ^ - [F] + ProxyRequests Off Order deny,allow Allow from all ProxyPreserveHost on - # proxy everything but /munin + # proxy everything but a few urls ProxyPass /munin ! ProxyPass /server-status ! ProxyPass /visitors-report.html ! diff --git a/update_jdn.sh b/update_jdn.sh index 8eddb24e..ac90a651 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -45,6 +45,7 @@ sudo cp -r etc/* /etc if [ ! -e /etc/apache2/mods-enabled/proxy.load ] ; then sudo a2enmod proxy sudo a2enmod proxy_http + sudo a2enmod rewrite fi sudo chown root.root /etc/sudoers.d/jenkins ; sudo chmod 700 /etc/sudoers.d/jenkins sudo ln -sf /etc/apache2/sites-available/jenkins.debian.net /etc/apache2/sites-enabled/000-default -- cgit v1.2.3-70-g09d2