You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Flanigan <da...@flanigan.net> on 2002/09/05 19:59:05 UTC

[users@httpd] Displaying Scripts as text?

  I have some home grown perl scrips that I would like to easily display as 
text, so people can copy the contents of the scripts. Is there an easy way to 
enable this in one directory only, and allowing normal execution in others?

 If I disable Exec CGI for the direcotry in quetsion, rather than seeing the 
script I get a permision denied with the following error:

Options ExecCGI is off in this directory: /var/www/html/perl/


--
Kind Regards, 
David A. Flanigan

dave@flanigan.net
http://www.flanigan.net


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Displaying Scripts as text?

Posted by Joshua Slive <jo...@slive.ca>.
David Flanigan wrote:
>   I have some home grown perl scrips that I would like to easily display as 
> text, so people can copy the contents of the scripts. Is there an easy way to 
> enable this in one directory only, and allowing normal execution in others?
> 
>  If I disable Exec CGI for the direcotry in quetsion, rather than seeing the 
> script I get a permision denied with the following error:
> 
> Options ExecCGI is off in this directory: /var/www/html/perl/

You'll also need to "RemoveHandler .cgi .pl":
http://httpd.apache.org/docs-2.0/mod/mod_mime.html#removehandler
and possibly set an apporpriate content-type "ForceType text/plain": 
http://httpd.apache.org/docs-2.0/mod/core.html#forcetype

Also note that some nasty features of MSIE make it almost impossible to 
reliably deliver text/plain content:
http://httpd.apache.org/docs/misc/FAQ.html#ie-ignores-mime

Joshua.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org