httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] Alias or ScriptAlias ?
Date Tue, 18 Jul 2006 09:48:24 GMT
> -----Original Message-----
> From: Mauro [] 
> Sent: Tuesday, July 18, 2006 11:28 AM
> To:
> Subject: [users@httpd] 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 and Options

Something like this might work:

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

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

You can also look at AddHandler
( to
extend CGI to all .cgi files.

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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message