Comments (2)
Some more information.
Given a Delphi MVC Framework app that outputs a DLL file "mod_FHIRBirdServer.dll" with the these symbols
// Declare exported variable so that Apache can access this module.
var
GModuleData: TApacheModuleData;
exports
GModuleData name 'FHIRBirdServer_module';
We have the following entries in the Apache httpd.conf file
# register the module that exports "FHIRBirdServer_module"
LoadModule FHIRBirdServer_module modules/mod_FHIRBirdServer.dll
# set the handler for the base path, this will not work
<Location />
SetHandler mod_FHIRBirdServer-handler
</Location>
# set the location for a path that will be discarded
<Location /abc/>
SetHandler mod_FHIRBirdServer-handler
</Location>
Navigating to http://localhost/ does not work, log files show
2023-12-20 07:25:31:108 [TID 1064 ][INFO ] pathinfo ""
2023-12-20 07:25:31:108 [TID 1064 ][INFO ] scriptinfo "/"
Navigating to http://localhost/abc/ does work, log files show
2023-12-20 09:43:08:889 [TID 15224 ][INFO ] pathinfo ""
2023-12-20 09:43:08:889 [TID 15224 ][INFO ] scriptname "/abc"
The original page had a link to a css file
<link rel="stylesheet" href="/dist/app.css" />
This shows a 404 not found in the browser dev tools
However the browser can fetch http://localhost/abc/dist/app.css (which is processed via the StaticFiles middleware mapped for a URL path of "/dist"
from delphimvcframework.
If you serve static files would be better to use the webserver facilities to do that and not the dmvcframework static files middleware. Just becouse web servers do a very good job doing... well, their job :-)
In such kind of project leave the static file for the web server and the API for dmvcframework. This is a best practice.
from delphimvcframework.
Related Issues (20)
- [Question] Alternative to FireDac usage for RPC calls to DB Query HOT 1
- Where is the ObjectsMappers unit?
- MVCFramework.Signal not in package dmvcframeworkRT
- Use LIB suffix 120 in SwagDoc
- JsonToDataset error HOT 1
- Method EMVCActiveRecordNotFound.AfterConstruction Variable FHTTPStatusCode is undeclared HOT 1
- Can't compile in Delphi 10.2 MVCFramework.ActiveRecord; AddTableMap method HOT 4
- TMVCJsonDataObjectsSerializer : should calls "ADataSet.first" ? HOT 4
- TMVCJsonDataObjectsSerializer.JsonObjectToDataSet not recognises ftExtended DataType
- Possible wrong http error code when authenticating HOT 1
- JWT Add Algorithms: RS256, RS384 & RS512 HOT 2
- [treatment for socket error]: log the error for socket and treat the Indy's memory leak bug
- Failed to serialize filtered dataset
- Receive Data Urls HOT 1
- MVCFramework BodyFor serializer does not work if type is TArray<Int64> HOT 1
- Not showing Cors headers in V.3.4.2 HOT 1
- Wrong or misleading Server response with missing Header information HOT 2
- Memory leak in MVCFramework.Serializer.JsonDataObjects
- Question about hosting project and SSL certificate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delphimvcframework.