Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Separating admin files from public cgi files

Quote Reply
Separating admin files from public cgi files
I have run into two problems trying to do this from Setup Options > Path and URL Settings

1. This is really quite trivial. Maybe I did things in the wrong sequence, or maybe it is a programming oversight. When I changed the values of admin_root_url and admin_root_path (within cgi-bin) the new values were not written into all the public cgi files at the line beginning "use lib ...". Easily fixed manually.

2. I want to move all admin files and directories that are not cgi out of the public_html into the non-public file system. There are eight cgi files that should remain in the cgi-bin (including mysqlman.cgi), but I don't want anything else there. But Setup Options > Setup Options apparently does not give me that option. I haven't tried it yet, because I don't want to risk messing up all the work I have done so far, so here is the question:
"Can I move all the non-cgi files, then modify admin_root_path accordingly (so that admin_root_url and admin_root_path would be two different directories), and expect Links SQL to work?"

Overall, I need the files organized like this ...
Public cgi files: .../public_html/cgi-bin/links
Admin cgi files: .../public_html/cgi-bin/private
All other admin files: /usr/home/my_account/links_sql


Last edited by:

YoYoYoYo: Sep 23, 2001, 9:42 PM
Quote Reply
Re: [YoYoYoYo] Separating admin files from public cgi files In reply to
Quote:
1. This is really quite trivial. Maybe I did things in the wrong sequence, or maybe it is a programming oversight. When I changed the values of admin_root_url and admin_root_path (within cgi-bin) the new values were not written into all the public cgi files at the line beginning "use lib ...". Easily fixed manually.

If you move things around you will have to change those manually. This is because that is use lib is set during the install.

If you have shell access, you can update it pretty easily though doing a:
perl -p -i.bak -e 's|use lib '\''/old/path/to/admin'\''|use lib '\''/new/path/to/admin'\''|' *.cgi

That will replace all occurances of "use lib '/old/path/to/admin'" to "use lib '/new/path/to/admin'" and make .bak files of the cgi files.

I'm not a links expert, so I can't answer any of the other questions Smile


Adrian

Last edited by:

brewt: Sep 23, 2001, 10:02 PM
Quote Reply
Re: [YoYoYoYo] Separating admin files from public cgi files In reply to
Hi,

2. No, you can not do this easily. Links SQL depends on files being in specific place relative to each other, and if you try and split it apart, there will be lots of problems. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Separating admin files from public cgi files In reply to
I've done it using symbolic links.
No problems.
No advantages either, unless, like me, you want to do it for general server management reasons. Otherwise, not worth the considerable effort required to test the modified installation.