Opened 9 years ago

Closed 8 years ago

Last modified 4 years ago

#3517 closed defect (fixed)

HTTP 403 Forbidden at http://postgis.net/casestudy/

Reported by: dbaston Owned by: robe
Priority: medium Milestone: Website Management, Bots
Component: website Version: 2.2.x
Keywords: Cc:

Description

Forbidden

You don't have permission to access /casestudy/ on this server. Apache/2.4.16 (Debian) Server at postgis.net Port 80

Change History (5)

comment:1 by nicklas, 9 years ago

Milestone: PostGIS 2.2.2

Have I messed things up here?

I works for me, and I didn't thought that I could affect file permissions through svn.

comment:2 by robe, 9 years ago

Component: postgiswebsite
Milestone: PostGIS 2.2.2Management 2.0
Owner: changed from pramsey to robe

comment:3 by robe, 9 years ago

It works fine for me.

http://postgis.net/casestudy/

I think the issue might be intermittent. You see the svn updates every 5 minutes and there is something fishy about our piecrust setup. So to work around the issue, I have to purge the counter file and rebuild twice.

While it's rebuilding the counter folder, you get that silly error. I haven't found a fix for that. We might want to go with strk's svn pull thingy so that it only does a build if there is something worth building.

Alternatively if someone is smart enough to fiddle with the shell script so it detects when there is an svn update and wrap the rebaking in that that would resolve this issue.

Come to think of it, I think this may be the cause of pramsey's complaint about getting 404 on Planet PostgreSQL - because it probably registers a 404 while building.

Anywhoo I have the whole nasty issue logged in #3387 and my half-assed work-around for it. Let me know if there is anything you think I should change in the script.

comment:4 by robe, 8 years ago

Resolution: fixed
Status: newclosed

I finally got tired of this error, and revised the script to only do an svn update and rebuild website if svn is newer than disk.

So script (/var/www/postgis_website_update.sh) changed to:

#! /bin/bash
REMOTE_REPO="https://svn.osgeo.org/postgis/web"
LOCAL_REPO="/var/www/postgis_website"

REMOTE_REV=`svn info $REMOTE_REPO | grep '^Revision:' | awk '{print $2}'`
LOCAL_REV=`svn info $LOCAL_REPO | grep '^Revision:' | awk '{print $2}'`

if [ $REMOTE_REV -eq $LOCAL_REV ]; then
    exit 0;
else
	cd /var/www/postgis_website
	rm -rf _counter/*
	/usr/bin/svn -q update
	#rm -rf _counter/*
	./_piecrust_1.2.0/bin/chef bake
	#for some reason baking once is not enough to bring back _counter
	./_piecrust_1.2.0/bin/chef bake
	chown -R www-data:www-data _cache _counter
fi

should significantly minimize this issue since it won't be happening every 5 minutes anymore, but only in the 20 second winodw when someone actually makes a commit to svn.

Last edited 8 years ago by robe (previous) (diff)

comment:5 by robe, 4 years ago

Milestone: Management 2.0Website Management, Bots

Milestone renamed

Note: See TracTickets for help on using tickets.