-1

I've installed Foswiki but I've problem when my app try load images. The images don't load...

I've get a solution but I'm not sure if is correct ...

This is my configuration for CGI directory

#
# "C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/Archivos de programa/Apache Software Foundation/Apache2.2/cgi-bin">
    AllowOverride All
    Options +ExecCGI 
    AddHandler cgi-script .cgi .pl
    AddHandler default-handler .jpg .png .gif .js .txt .bat .css 
    Order allow,deny
    Allow from all
</Directory>

I have to add the extensions one by one :(...

Cesar Miguel
  • 661
  • 1
  • 13
  • 38
  • 1
    This isn't a Perl question or a programming question. But the answer is: you're not supposed to put images or CSS (or any kind of files) in the `cgi-bin` directory; only executable programs. – hobbs Mar 26 '13 at 00:29
  • "doesn't load" - what *does* happen? does the request get to the server? what status or content is returned in the response? – ysth Mar 26 '13 at 01:01

1 Answers1

1

Going out on a bit of a limb here, but I'm guessing that, in addition to the configuration included in your question, this directory is also the target of a ScriptAlias directive (probably for /cgi-bin, and possibly in the default Apache configuration rather than in something you've explicitly done). ScriptAlias says that every file in the directory is a CGI script; see the directive documentation. That's why you have to override that behavior with AddHandler.

If you want to control which files are executed as CGI scripts using AddHandler with file extensions like .cgi, don't use ScriptAlias. Without ScriptAlias, the default will be to serve the file out as a resource unless you explicitly say to execute it as a CGI script.

rra
  • 3,807
  • 18
  • 29