Forum Moderators: coopster & phranque

Message Too Old, No Replies

Use symlink to point to a cgi script?

         

doctormelodious

4:02 am on Jul 3, 2004 (gmt 0)

10+ Year Member



Greetings,

I have used symlink as follows:


symlink("/home/www/myDomain/cgi-bin/editor/customPage.cgi",
"/home/www/myDomain/customPage.cgi") or dienice ("failed");

My reason for wanting to do this is to provide a shorter URL for people.

The symlink was successfully created. Via FTP I double-checked the permissions, and looked at the contents -- the contents of the original file.

The problem is that I can't run the script from the symlink URL:


http://myDomain.org/customPage.cgi?foo=bar

I get an Internal Server Error. Is this just something you can't do, or is there a trick for running a CGI script from a symbolic link?

Thanks much!
Perry

MattyMoose

10:11 pm on Jul 14, 2004 (gmt 0)

10+ Year Member



I think it's because your symlink points to a directory that's not /cgi-bin/.

Try adding your "/" directory to the allowed Execute thingies in Apache. (I can't remember what it's called).

You may want to look more in depth into how cgi-bin directories work, since I haven't worked much with cgi-bin. :)

HTH,
-MM