Even when I try the following I get a 404 error whenever browsing to any URL with 'paper' in it
location ~ paper {
allow all;
deny 192.168.1.5;
}
location ~ paper {
allow all;
deny 192.168.1.5;
}