On 07/03/07, thomas Armstrong <tarmstrong@xxxxxxxxx> wrote:
Hi, Using Apache 2.0.59 on Linux, I try to install a ScriptAlias. My DocumentRoot is '/home/project/web', and the ScriptAlias directive within httpd.conf is: ----- ScriptAlias /videos/ /home/project/modules/videos/web/ <Directory "/home/project/modules/"> AddHandler application/x-httpd-php .php AddHandler text/css css DirectoryIndex index.php </Directory> ----- 'http://foo/videos/index.php' works ok, but if I access 'http://foo/videos/', I get a "403 Forbidden" error, and browsing the error log: ----- [Wed Mar 07 04:37:02 2007] [error] [client ac74:d008:f82f:8abf:306f:d300:a00:0] attempt to invoke directory as script: /home/project/modules/videos/web/ --------- I chmoded 777 all the '/home/project/modules/videos/' directory. What am I doing wrong?
Everything it seems. Your config is wrong in lots of ways. First, "AddHandler text/css css" doesn't make any sense. text/css is a mime type, not a handler and it's highly likely that your server already knows about it. See your mime.types file to make sure. Second, why are you using ScriptAlias? That's only useful for situations where every file in a directory is a directly executable cgi script, not usually the case with php scripts and certainly not when there are things like css files in that directory. On the off chance that you are actually forced to run php as a bunch of cgi scripts then the error message is explained here: http://wiki.apache.org/httpd/Errors/DirectoryAsScript however I expect that you shouldn't be using ScriptAlias at all. One last thing, never, ever, use 777 permissions. -- noodl --------------------------------------------------------------------- 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