Re: [users@httpd] Alias or ScriptAlias ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18.07.06 11:48, Boyle Owen wrote:
> 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.

I don't think this is a problem. or, better said, such problem can appear
anywhere (e.g. just rename .php to something else)

> However, it can be done using SetHandler (see
> http://httpd.apache.org/docs/2.2/mod/core.html#sethandler) and Options
> ExecCGI.

I find AddHandler simpler and universal:

AddHandler cgi-script .cgi
Options ExecCGI

and it will work globally. If you want to enable/disable CGI's per-context,
you only need to put Options +-ExecCGI into VirtualHost/Directory/Location
secrionc.

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

Or simply index.cgi and let user use proper name for the script...

(e.g. "DirectoryIndex index.var index.cgi index.html")

> 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.

I wonder why didn't you start with this ;)
-- 
Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
42.7 percent of all statistics are made up on the spot. 

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux