SteveW Posted December 6, 2010 Posted December 6, 2010 If I put an index.html file in my cgi-bin, I can call it with my browser. But if I put a test.txt file in cgi-bin, the request returns a 500 Internal Server Error. If I put test.txt in any other folder, I can request it successfully. Are the handlers specially configured for cgi-bin such that there isn't one defined for .txt? The "problem" was solved by putting the file somewhere else. I'm just trying to understand why it happened. Quote
TCH-Bruce Posted December 6, 2010 Posted December 6, 2010 Why would you want to put txt files in the cgi-bin folder? That folder is used primarily for scripts that are executable. I'd make a separate folder for txt files you want to serve in a browser. Quote
SteveW Posted December 7, 2010 Author Posted December 7, 2010 It's not quite as strange as it sounds. The perl script has a .txt data file that it reads. It's a list of words that the script will consider "trivial" when it encounters them. I thought people using the script might be interested to know which words are in that list, so on my web page (not in cgi-bin) that discusses the script, I put a hyperlink to the text file. Clicking on that link is what causes the "500" errors. However, the easy solution was to move the .txt file out of cgi-bin into the same directory as the web page, and revise the script to read the file from its new location instead of from cgi-bin. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.