SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I want to get WebFTP running on my Apache2 server but when I go to access the *.cgi script which is written is perl it only comes up as test, like I was opening a *.txt file. I am guessing that there is an Apache module that I need to include in my httpd.conf but I am more likely wrong. What is it that is keeping me from running this file? Thanks
Note: I do have perl installed and in the WebFTP.conf file, it asks where my perl binary is and I double check that the location is valid and that I have perl installed.
Last edited by darkarcon2015; 01-24-2005 at 08:33 AM.
You will need to include mod_cgi. You will also need to set either ScriptAlias or use AddHandler to set the file extensions of any cgi scripts you'll be using. This is all covered in great detail in the Apache manual:
Okay I made sure everything is correct but whenever I try to access my *.cgi file it says that it is Forbidden. I made the cgi-bin folder and the folder that Web-FTP is in all Read-Write enabled and still a forbidden message.
Did you setup ScriptAlias, as well as allow access to the cgi-bin directory in the httpd.conf? Here's an example:
Code:
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Ok, what is the complete path to your document root? What is the complete path to your server root? And what is the complete path to the cgi-bin directory? What are the permissions on the directory and who owns them, ie "ls -l". You could also post your httpd.conf file if you want.
The cgi-bin directory is usually setup relative to the server root, not the document root. In other words it would go in the same directory where the "conf" directory resides (usually apache2), not within the directory where the website's html pages are. Of course that's not written in stone, it's just how things are usually done by default and what the above ScriptAlias assumes.
Do you have mod_alias loaded? It is required for scriptalias to work and I bet your cgi-bin directory access is setup to only load if that module is loaded, ie within a <IfModule mod_alias.c> </IfModule>. The permissions should be this on the cgi-bin directory:
Code:
drwxr-xr-x 2 root root 4096 Oct 31 15:00 cgi-bin/
Post the ScriptAlias line as well as the Directory setup for the cgi-bin directory.
At this point I'm not even sure you can access files within the cgi-bin directory. What is the exact error you recieve? Try commenting out the ScriptAlias directive, place this under it:
I did the first part and when I accessed test.txt I saw the word "testing" like I should have. Then I did the next thing and when I ran the test.cgi I saw the word "Hello" like I should have. So is this a problem with Web-FTP?
EDIT: Okay, now when I access the web-ftpc.cgi file I get an Internal Server Error.
EDIT2: I can now access the web-ftp.cgi but when I enter my boxes account info it doesnt go anywhere (i.e. username and password).
Last edited by darkarcon2015; 01-26-2005 at 03:30 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.