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

path error or error 404

Quote Reply
path error or error 404
My domain name is www.webs4biz.com. Have tried everyting I can think of to get this running! Below is info from my server:

If you have a custom CGI script that you need to use, simply upload it to your personal cgi directory. Here are some helpful tips to follow when installing Perl scripts:

  1. Upload to your cgi directory and ensure proper file permission settings
  2. Upload in ASCII transfer mode (NOT BINARY mode)
  3. The first line of each script must read:

    #!/usr/bin/perl

  4. Reference the script using /cgi (NOT /cgi-bin)



If a script calls another file within your account, but the script does NOT require a URL, you need to use the system path.

/home/<userid>/HTML/... <- if the file is in your website root directory
/home/<userid>/HTML/cgi/... <- if the file is in your cgi directory

Substitute the path to the file beginning with your userid. Your userid is the directory name of your account

Do I need to change the path for perl? I tried that with no luck...also have triple checked permissions. the only confusion might be where to put everything. This is how I set things up:

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/home/webs4biz/HTML/cgi/links2/admin";
$db_dir_url = "http://www.webs4biz.com/cgi/links2/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://www.webs4biz.com/cgi";
# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/home/webs4biz/HTML/cgi/links2/pages";
$build_root_url = "http://www.webs4biz.com/cgi/links2/pages";
Quote Reply
Re: [sdaytona] path error or error 404 In reply to
Hi there, your paths seem to be ok. But to be on the safe side I would upload a file called perldiver.cgi into your cgi-bin and this will tell you all required paths including sendmail etc. I see that you already have a cgi-bin opened up with a folder called dclinks, I presume this is woring ok so you must know your paths. I would also recommend either protecting your cgi-bin or at least upload an index.html into your directory to prevent access like this. A simplier solution would be Chmod the directory.



Another thought to your orignal problem try chmoding all files and folders 777 but all .cgi files to 755. This sometimes works.

Last edited by:

stu2000: Aug 15, 2002, 11:24 AM
Quote Reply
Re: [stu2000] path error or error 404 In reply to
Hi...

Thanks for the help! Didn't realize I left myself wide open without an index file in my cgi.

A little confusion, not sure what files to put in what dir. In the readme file it suggests that you make a dir called links off your cgi-bin. In my case, I would make it off my cgi directory, not cgi-bin because it does not exist. The confusion is further down... the suggested directory structure is another cgi-bin.... ???

Example:

1. Unzip the distribution and you should see two directories cgi-bin
and pages. Upload everything in cgi-bin in ASCII mode to a directory
on your server that can run cgi. For example, I recommend creating a
directory called links off your cgi-bin. You'll end up with a structure
like:
/cgi-bin/links - User cgi like search.cgi, add.cgi, etc.
/cgi-bin/links/admin - All the admin programs.

Make sure all the files are transferred in ASCII mode!!

Upload the cascading style sheet: links.css and the background image
to the directory where you want the pages created.

2. Double check that the Path to perl is correct. Links defaults with
#!/usr/local/bin/perl

If this is incorrect, you'll need to edit the first line of every .cgi
program, and change it to where you have Perl version 5 installed.

I hace edited the path to perl & taken out the "local" so I think that is ok isin't it?

Next, I guess I need to upload all the files & set permissions, just not sure of the dir structure becase of having a "cgi", not cgi-bin... make sense?

Thanks in advance for all the help!

Gary
Quote Reply
Re: [sdaytona] path error or error 404 In reply to
Hi again,

For simplicity only. I do the following then make all the chmod changes at the end once everything is working.

Create a folder in your cgi-bin (or cgi whatever your cgi bin is called) call the new folder links (chmod 755)
In this folder upload the contents of the cgi-bin folder which you have just downloaded in ASCII not BINARY.

For example the structure should look like this

CGI BIN (Folder chmod 755)
-- Links (Folder chmod 755)
----- Admin (Folder chmod 755)
----- add, jump, modify, rate, search, subscribe (all chmod 755)

In your admin folder you will have the following

Admin (Folder chmod 755)
--- Back up (Folder chmod 777) also chmod content files to 777
--- Data (Folder chmod 777) also chmod content files to 777
--- Templates (Folder chmod 777) also chmod content files to 777
--- outside these 3 folders you have the rest of the scripts (chmod all cgi files to 755 and everything else to 777 e.g - admin.cgi, admin_html.pl, category.def, db.pl, db_utils.pl, links.cfg, links.def, mailer.pm, nph_build.cgi, nph_email.cgi, nph_verify.cgi, site_html.pl, Site_html_templates.pl, Template.pm

Ok, after all that, in your html folder out side your cgi bin create a folder called links, create a blank index.html page and upload this into your new folder along with .css file etc. Also in this folder create several other folders called, Images, New, Cool, Ratings, Detailed.

Links 2.0 does a lot of this for you automatically, like creating blank inde files and new, cool, rating, detailed folders etc, but to save you from any problems when you come to 'build all, in your admin menu later its easier just to create them. (Thats why the above part is not mentioned in the readme instructions as links 2.0 should Tongue do this for you.

Once all files are correctly uploaded etc etc. you must now edit your links.cfg in your cgi-bin/links/admin/ directory file to correspond to all your paths etc.

After all that, goto http://www.yoursite.com/cgi-bin/links/admin.admin.cgi


Please note all the Chmod settings listed above are for test purposes only, once you have the script running bug free, then re-read the read me provided with your download and change the settings to their reccomendations, also password secure your admin directory to prevent any foul play.



Sorry its long winded, prob confused you even more, but I knew what I was trying to say in my head, prob just didn't turn out right. I am sure if any of its wrong, the veterens will be around to shoot me down in flames Pirate

Stu2000

- Top 100 forums / GT Links 2.0 websites -

Last edited by:

stu2000: Aug 15, 2002, 5:44 PM