CGI-bin and web-hosted domains

Web hosting discussion, programming, and shared and dedicated servers.
3 posts Page 1 of 1
by mrpasini » Thu Jan 03, 2013 6:01 pm
According to the CGI FAQ List (https://wiki.sonic.net/wiki/CGI_FAQ_List):

"If you have a web-hosted domain name, any requests for the "cgi-bin" or "cgi" subdirectory will be directed to content in /usr/local/lib/httpd/cgi-bin/ instead of your normal web content. This is an artifact of an older web cluster configuration left in-place to support legacy web sites."

But I've found that calls to my Value Hosting site at http://[mydomain.com]/cgi-bin/test.pl return a 404 Not Found error. And calls to http://[mydomain.com]/cgi/test.pl return, "CGIwrap Error: User not found in passwd file."

What does work, however, is adding my username to the URL: http://[mydomain.com]/cgi-bin/[username]/test.pl or http://[mydomain.com]/cgi/[username]/test.pl
by williamt » Mon Jan 07, 2013 10:10 am
The statement is kind of confusing.
It's trying to say the location on disk where your cgi files are located not the url.
You need to add your username after cgi-bin so http://mydomain.com/cgi-bin/username/test.pl

You should probably stick to using /cgi-bin/ over /cgi/
Sr. Systems Administrator @ sonic.net
by mrpasini » Mon Jan 07, 2013 10:44 am
Yes, I think the FAQ should include your note that "You need to add your username after cgi-bin so http://mydomain.com/cgi-bin/username/test.pl.

The phrase "any requests for the 'cgi-bin' or 'cgi' subdirectory will be directed to" suggested otherwise to me.
3 posts Page 1 of 1

Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 13 guests