1847337 Members
2159 Online
110264 Solutions
New Discussion

apache server problem

 
Peter Heinemann
Frequent Advisor

apache server problem

When accessing a cgi, my browser provides a "File Download" popup rather than trying to execute the program.

Any help/explanation would be appreciated.


Here are the relevant httpd.conf entries:

Alias /RightSiteDir "/opt/apps/documentum/rightsite/applications/"

AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all


Alias /rs-bin "/opt/apps/documentum/rightsite/product/bin/"

AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all


ScriptAlias /rs-bin/ "/opt/apps/documentum/rightsite/product/bin/"
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: apache server problem

If you are missing a trailing slash / from your cgi-bin directory directive, this behavior could happen.

Example.

ScriptAlias /cgi-bin/ "/ias/product/1.0.2/Apache/Apache/cgi-bin/"

That entry controls the location and characteristics of cgi bin programs.

The location needs to exist and the scripts need x(execute) permissions.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Denver Osborn
Honored Contributor

Re: apache server problem

What type of file (.cgi or .pl ext) is it that gives you the "file download" box rather than execute the script. you should look to the "AddHandler" entries in your httpd.conf file. It sounds like the type of file doesn't have any action associated w/ it from the web server.

Hope this helps,
-denver
Peter Heinemann
Frequent Advisor

Re: apache server problem

Steven: the permissions are ok(that's not the error) and the trailing slash is present (see excerpt in the original post).
Denver: Here's the rub: the scripts in the target directory don't have extensions (!). Is there a wildcard value for AddHandler?
Denver Osborn
Honored Contributor

Re: apache server problem

If your httpd.conf file is the same as you posted....


move the "ScriptAlias" above the "Alias /rs-bin..." line.
________________

ScriptAlias /rs-bin/ "/opt/apps/documentum/rightsite/product/bin/"

Alias /rs-bin "/opt/apps/documentum/rightsite/product/bin/"

AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all

_________________

Then stop/start apache web srvr, that should do it....

-denver
Andy Nicastro
Occasional Advisor

Re: apache server problem

Hi,
I have just the opposite problem.
After creating an ASCII data file from within a browser application programmed in Perl CGI, I want the user to be able to save it. I am, therefore, trying to get the "File Download" popup to appear.
====
After creating the file in the apache server's /tmp/ diectory, I use
print "Content-Type: ASCII"; ilenam= etc. ...
"Disposition: inline"...
When I Open the file and read it, it writes to the browser instead of giving me the "File Download" popup.
=====
I can get it to work correctly if I first zip the file, but I'd like to give the user the option of not zipping it first.
=====
Do you have any ideas?
Thanks very much,
Andy Nicastro
Publtec B.V.
a.nicastro@publitec.nl