Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

need /cgi-bin to be /cgi-bin/admin in pages

Quote Reply
need /cgi-bin to be /cgi-bin/admin in pages
I've got the scripts in /cgi-bin/admin in my web setup (/cgi-bin/admin/admin.cgi is the address for the admin program).

When I build the pages, they have as their address /cgi-bin/search.cgi, etc. which obviously results in a 404 error. How can I make it so that the built pages point to /cgi-bin/admin/*.cgi ?

Thanks!

- Steve
Quote Reply
Re: need /cgi-bin to be /cgi-bin/admin in pages In reply to
The only scripts you want in your /cgi-bin/admin directory are your admin scripts. The user accessible scripts should go in just /cgi-bin. The reason for this is that you should be password protecting your /cgi-bin/admin directory (if you can) to keep others from accessing your admin functions and doing other damage. If the directory is password protected, then users would not be able to use add.cgi, search.cgi, etc., if they were in the same /cgi-bin/admin directory.

You could, however, change the structure to something like:

/cgi-bin/links
/cgi-bin/links/admin

Then put the user scripts in /cgi-bin/links and your admin scripts, data files, etc., in and under /cgi-bin/links/admin and password protect it.

That is the way I would do it.
Quote Reply
Re: need /cgi-bin to be /cgi-bin/admin in pages In reply to
     
Code:
# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/alex/links/cgi-bin/admin";
$db_dir_url = "http://localhost/links/cgi-bin/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://localhost/links/cgi-bin";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/alex/links/pages";
$build_root_url = "http://localhost/links/pages";

You also should go through links.cfg and check all the other settings and change them as needed.

Quote:
Which ones should I back out to cgi/bin/links in order to make everything work?

The following scripts should be in your links directory:

add.cgi
jump.cgi
modify.cgi
rate.cgi
search.cgi
subscribe.cgi

Quote:
do I have to create blank what's new, what's cool, etc. pages or does the script automatically create them for me?

The script will automatically create any directory needed except the root web directory where the pages will be built (pointed to by $build_root_path).

[This message has been edited by Bobsie (edited March 29, 1999).]
Quote Reply
Re: need /cgi-bin to be /cgi-bin/admin in pages In reply to
Well, parts of it are working. But when it goes to build the what's new area, I get an error:

CGI ERROR
==========================================
Error Message : unable to open what's new page:
/www/doc/links/New/index.html. Reason: No such file or directory
Script Location : /www/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.00404


Any ideas?
Quote Reply
Re: need /cgi-bin to be /cgi-bin/admin in pages In reply to
Thanks Bobsie, for your reply.

Do I have to edit any special config files to do this? I currently have all files inside /cgi-bin/links/admin. Which ones should I back out to cgi/bin/links in order to make everything work?

Also, do I have to create blank what's new, what's cool, etc. pages or does the script automatically create them for me?

Thanks!!!!
Quote Reply
Re: need /cgi-bin to be /cgi-bin/admin in pages In reply to
Can you post the first 5 paths/url's you have configured at the top of links.cfg?
Quote Reply
Re: need /cgi-bin to be /cgi-bin/admin in pages In reply to
Also, posting the entire error message is helpful, because usually the proper path is in the environment variables.

Cheers,

Alex