Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
03-12-2006, 06:26 PM
|
#1
|
LQ Newbie
Registered: Mar 2006
Posts: 6
Rep:
|
Apache CGI problems
SuSE 10
Apache2
I just enable cgi on my apache2 server and when I point a browser to the script it tries to download it instead of executing it.
It works if I use the extension .cgi but .pl will only try to download, both files are identical with the exception of the extension.
I have tried adding "AddType cgi-script .pl" to the mod_mime0defaults.conf as well as the mime.types file. I also tried adding AddHandler to the directory directive.
Please help, I have been fighting this for hours and am dumbfounded.
Thanks,
|
|
|
03-12-2006, 06:57 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Can you post the section of your httpd.conf file where you used the AddHandler directive? It should have worked - here is an example for a Bugzilla box (I added the .pl to the AddHandler directive only to show the syntax):
Code:
<Directory /usr/local/bugzilla-2.20.1>
AddHandler cgi-script .cgi .pl
Options +Indexes +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride Limit
Order allow,deny
Allow from all
</Directory>
|
|
|
03-12-2006, 07:05 PM
|
#3
|
LQ Newbie
Registered: Mar 2006
Posts: 6
Original Poster
Rep:
|
This is what I have listed in the default-server.conf file. It is included
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"
# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/srv/www/cgi-bin">
AddHandler cgi-script .pl
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
</Directory>
|
|
|
03-12-2006, 08:15 PM
|
#4
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
That's odd - the one I posted above works for .cgi or .pl files. The only way I could make it stop was to add a .htaccess file to the directory to deny access to .pl files. Do you use .htaccess files at all?
|
|
|
03-12-2006, 10:08 PM
|
#5
|
LQ Newbie
Registered: Mar 2006
Posts: 6
Original Poster
Rep:
|
I am using it, in other directories, not in this one.
|
|
|
03-12-2006, 10:23 PM
|
#6
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
Apart from confirming that the file is executable by whatever user Apache is running as, have you had a look at http://httpd.apache.org/docs/2.0/how...l#troubleshoot?
|
|
|
03-12-2006, 10:58 PM
|
#7
|
LQ Newbie
Registered: Mar 2006
Posts: 6
Original Poster
Rep:
|
rights are properly set, -rwxr-xr-x. I will review the docs, thanks for your help.
|
|
|
All times are GMT -5. The time now is 07:14 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|