Working Apache configuration for NOID resolver?

Skip to first unread message

Karl Holten

Feb 27, 2023, 1:18:07 PMFeb 27
to ARKs

The University of Wisconsin-Milwaukee is looking at issuing ARK identifiers using NOID. We have successfully issued IDs over apache but we are having problems getting them to resolve using the directions available on CPANM. I know there is probably some overlap between those using ARK and NOID, so I'm hoping someone can point out what is wrong with the apache configuration, or provide a working one of their own. If not, does someone know of a community for NOID that might be able to help? Thanks.

<VirtualHost *:80>
  DocumentRoot /var/www/noid/public
  ErrorLog /var/log/noid/error_log
  CustomLog /var/log/noid/access_log common
  Alias /noid/ /var/www/noid/public

  ScriptAliasMatch ^/ic/noidu(.*) "/var/www/noid/public/noidu$1"
  ScriptAliasMatch ^/public/noidr(.*) "/var/www/noid/public/noidr$1"

  <Location /var/www/noid/public>
    AllowOverride All
      SetHandler perl-script
      PerlResponseHandler ModPerl::Registry
      PerlOptions +ParseHeaders
      Options +ExecCGI
      Order allow,deny
      Allow from all


RewriteEngine on
# External resolution; start program once on server start
RewriteMap  rslv           prg:/var/www/noid/public/noidr_kt5

# Main lookup; add artificial prefix for subsequent testing
RewriteRule ^/ark:/(99999/.*)$ "_rslv_${rslv:get $1 myGoto}"

# Test: redirect [R] if it looks like a redirect
RewriteRule ^_rslv_([^:]*://.*)$    $1 [R]
# Test: strip prefix; pass through [PT] if intended for us
RewriteRule ^_rslv_(/.*)$           $1 [PT]
# Test: restore value if lookup failed; let come what may
RewriteRule ^_rslv_$                %{REQUEST_URI}
# Alternative: redirect failed lookup to a global resolver

#RewriteLock /var/log/noid/redirect_lock
#RewriteLog /var/log/noid/redirect_log
#RewriteLock   /var/log/rewrite/lock
#RewriteLog    /var/log/rewrite/log
## RewriteLogLevel 9


Id: kt3x841 Element: myGoto Bind: set Status: ok, 20 bytes written, replacing 20 bytes


Response: 404 Error

John Kunze

Feb 27, 2023, 2:32:28 PMFeb 27
There's a problem in that key that you are binding needs to have the NAAN prepended to it. What you probably want to do is make sure the minter is set up to output things like


instead of just


It's that first longer string that you want to bind to, since the NAAN is stored with the random string that the minter generated.

The reason to store the NAAN as well as the random string is so that you can store test ARKs (NAAN=99999) along with your real ARKs (under your own NAAN). Also, some organizations support more than one NAAN. 

The example doc excerpt  below shows the longer string in use, in this case with the 13030 NAAN.

In this case we stored a URL in "myGoto". This kind of convention can underly a redirection mechanism that is part of an organization's overall identifier resolution strategy. To retrieve that stored data,

You received this message because you are subscribed to the Google Groups ARKs group. To post to this group, send email to To unsubscribe from this group, send email to For more options, visit this group at
You received this message because you are subscribed to the Google Groups "ARKs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

John Kunze

Feb 27, 2023, 10:16:50 PMFeb 27
Thinking about this more, the noid documentation could be a little more complete and ready-to-go.

For the resolver to work with those rewrite rules, you'll want a minter that prepends the NAAN in front of the generated strings. Here's an example of a minter that will prepend a NAAN and a "shoulder" (kt5).

noid -f $d dbcreate $shdr.reedeedk long $naan demo

Karl Holten

Feb 28, 2023, 12:44:43 PMFeb 28
to ARKs
That worked! I misinterpreted the Rewrite rule and thought it was just matching on the end part.
I created a directory called kt5 and set kt5 as the $d variable and wound up with the following:

noid -f kt5 dbcreate kt5.reedeedk long 99999 demo

Now that I've included the NAAN as part of the ID generator it is resolving just fine. Thank you so much!

John Kunze

Feb 28, 2023, 2:31:49 PMFeb 28
Very glad to hear that it's working.

We'd love for you to share your implementation story in a short blog post (eg, 2 paragraphs) at some point. Let me know if that's interesting to you!

Reply all
Reply to author
0 new messages