httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Salisbury" <salisb...@globe.gov>
Subject [users@httpd] AddType & Action directives
Date Fri, 29 Sep 2006 23:30:28 GMT

There seems to be some magic that goes on behind the scenes, and perhaps
someone can shed some light.  We have a php script that works with the 
pertinent Apache configuration directives being:


ScriptAlias /php/ "/usr/local/bin/"
<Location ~ /php>
 Options -Indexes
</Location>
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php"


Though I don't believe the Location directive does anything other
than restrict auto-indexing.

With the above directives a .php file is read and processed by PHP, even 
though there is nothing in the url with php in the path, just
/some/dir/phpinfo.php works!  That to me is magic, as I would 
think the /php/ directory would be what tells apache to go to 
/usr/local/bin/php.

anyways, I'm trying to do the same thing with eruby ( actually erb )
and can't seem to get it to work


ScriptAlias /erb/ "/usr/local/bin/"
AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby /erb/erb
 

And I'm asked if I want to download the file.  and in looking, that file is the html for a
500
internal server error

I do have 
application/x-httpd-eruby       rhtml
in mime types, but I think that's only used if I don't add the AddType in the conf file.

Any help clarifying what's going on would be appreciated.

Thanx!

-ds



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


Mime
View raw message