Closed Al-Muhandis closed 6 years ago
{$mode objfpc}{$H+}
uses
fpmimetypes, BrookUtils, BrookFCLHTTPAppBroker, BrookApplication, BrookStaticFileBroker;
begin
MimeTypes.LoadFromFile('/etc/mime.types'); // skip if you don't have one, then everything will be of content-type application/octet-stream
BrookStaticFileRegisterDirectory('/','/real/path/in/your/filesystem');
BrookSettings.Port := 9000;
Application.Run;
end.
Thank very much... I tried this option, but the application apparently gets stuck in a loop (Out of memory HTTP 500) because of alias in the Apache settings ScriptAlias / /var/www/user1/data/www/mysite_example.com/cgi-bin/index.fcgi/
Well... don't use that alias then, let the application handle it.
Thank you
Closing since the problem was fixed. Thanks for reporting @Al-Muhandis !
I use directory with static files (css, js and so on) by means BrookStaticFileBroker. But if I must to place static file in the root url? For example, robots.txt. With the condition that in Apache set alias from the root url to the app in the cgi-bin folder.