Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Having a bit of a problem with CGI scripts without file extensions (eg. www.mydomain.com/cgi-bin/qmailadmin). When I go to the address of the cgi script, I am just prompted to download the file. I presume that I need to put an AddType directive into httpd.conf to map these files to the right mime type, but I'm not quite sure how to do it.
Thanks, but everyone else on the internet seems to have it working fine without an extension. The main thing I'm trying to get to work is qmailadmin following the tutorial on qmailrocks.org, and I've looked through all the documentation on it and it says nothing about editing your apache config.
which suggests that it is an executable rather than a bit of perl. I can put a .cgi file extension onto the end of qmailadmin to get qmailadmin.cgi, and it runs alright in a browser. But as soon as I try to submit something, it tries to find qmailadmin again and comes back with a 404 error. I also tried symlinking qmailadmin to qmailadmin.cgi and telling apache to follow symlinks in that directory, but to no avail.
Can't use symlinks thru a browser, not possible that I know of. Come to think of it you can most likely use it without extensions but you need to tell apache this and configure it properly. I unfortunately have never bothered to do this so I'd suggest reading up the docs over at httpd.apache.org for more information in configuring apache to know to execute without an extension.
Originally posted by Donboy You dont need the extension. It will work without it. Your permissions/ownerships must be wrong.
It can't be his permissions.. he changes the name with a .cgi at the end and it executes.. it just tries to go back to the original filename, my guess is it refers to that name in the script.
There is no extension and apache thinks its a binary file so its prompting to download. You have to get apache to execute this file instead of prompting to download since it has no extensions to define what kind of script it is.. a cgi or pl and so on.
Originally posted by scuffell Sorted it, had to add a SetHandler directive into httpd.conf to tell apache that everything in /cgi-bin was a cgi-script.
Thanks for your help anyway
Glad it worked.. as I knew it wasn't a permissions issue
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.