开发者

How do I configure a ASAPI DLL for Delphi in Apache 2.X?

I'm trying to understand ISAPI as run under Apache 2.x. I've created a simple DLL using Delphi XE to test with based on a tutorial I found.

I've added these lines to my Apache httpd.conf file.

ScriptAlias /Delphi/ "C:/Delphi/bin/"
<Directory "C:/Delphi/bin/">
  AddHandler isapi-handler .dll    
  AllowOverride None
  Options ExecCGI
  Order allow,deny
  Allow from all
</Directory>

The isapi_module is loaded.

I've placed开发者_JAVA百科 the DLL in C:\Delphi\bin.

When I call it with the following URL (case is correct); http://127.0.0.1/Delphi/ISAPI_Test1.dll

I get a 403 error and the Apache Error Log has this line.

... [error] [client 127.0.0.1] attempt to invoke directory as script: C:/Delphi/bin/

I expect the dll to simply use the default handler:

procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
  begin
    Response.SendRedirect (Request.Referer);
  end;

Question 1: What is my specific issue here?

Question 2: Can anybody point me to a step by step tutorial or book for getting a basic skelton working? I've got too many holes in my understanding at this point.

Thank you.


For this subject, look at serverfault.com, for example, this question: apache attempt to invoke directory as script

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜