> -----Original Message-----
> From: Mauro [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 18, 2006 11:28 AM
> To: users@httpd.apache.org
> Subject: [EMAIL PROTECTED] Alias or ScriptAlias ?
> 
> Hi all,
> I  have my server with its document root running.
> Now I would like to add another directory in which:
> every user go to www.myserver.mine/mydir/ execute 
> /myserver/mydir/script.cgi 
> In this directory there are also some subdirs with css, icons 
> and html pages I would like web server shows.
>  
> If i configure it like
> "ScriptAlias" 
> web server try to execute all inside
> If i configure it like
> "Alias"
> and I add 
> "DirectoryIndex script.cgi"
> "Options +ExecCGI"
> web server shows me content of script.cgi without executing it.

It is not a great idea to mix static and CGI content in the same
directory since a simple misconfiguration can put your code on the web.
However, it can be done using SetHandler (see
http://httpd.apache.org/docs/2.2/mod/core.html#sethandler) and Options
ExecCGI. 

Something like this might work:

<Location /mydir/script.cgi>
  Options ExecCGI
  SetHandler cgi-script
</Location>

You also need "DirectoryIndex script.cgi" in that dir...

You can also look at AddHandler
(http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler) to
extend CGI to all .cgi files.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

>  
> Could you help me?
>  
> Thank Yoo
>  
> Mauro
>  
>
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to