Okay....this post is more clear (PLEASE stopping adding duplicate issues/posts...thank you).
Anyway...the problem is with your $db_cgi_url setting in the links.cfg. Double check the relative and absolute path settings for all variables in the links.cfg file.
Regards,
Eliot Lee