CI: win-x64-publish en FTPS-upload van de ASF-host naar IIS (standaard uit) #38
@@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
web.config for the ASF production host on IIS (MijnHostingPartner). It REPLACES the web.config that
|
||||||
|
`dotnet publish` generates (the pipeline copies this file over it, see publish-asf-production).
|
||||||
|
|
||||||
|
Deliberately small: the aspNetCore handler (inprocess), the stdout log for the first start, the upload limit,
|
||||||
|
request filtering as defense in depth, and the hoster's defaults. No settings and no secrets live here: they
|
||||||
|
are all in the server-only appsettings.Production.json next to the program. The only environment
|
||||||
|
variable is ASPNETCORE_ENVIRONMENT. See aidlc-docs/features/andreaslop-site-hosting/asf-iis-production-config.md.
|
||||||
|
-->
|
||||||
|
<configuration>
|
||||||
|
<location path="." inheritInChildApplications="false">
|
||||||
|
<system.webServer>
|
||||||
|
<handlers>
|
||||||
|
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
|
||||||
|
</handlers>
|
||||||
|
|
||||||
|
<!-- inprocess: the app runs inside the IIS worker process (Hosting Bundle is installed on the host).
|
||||||
|
stdoutLogEnabled is "true" ONLY for the first start: it logs the startup lines (migrations, Magick
|
||||||
|
self-test, guard messages; no secrets). Set it to "false" after the first successful start (see
|
||||||
|
docs/deploy-asf-productie.md), otherwise the files in .\logs keep growing. The logs folder must exist
|
||||||
|
and be writable for the application pool identity; the deploy never touches it. -->
|
||||||
|
<aspNetCore processPath=".\SlpModularCms.Api.AndreaSlopFotografie.exe"
|
||||||
|
arguments=""
|
||||||
|
hostingModel="inprocess"
|
||||||
|
stdoutLogEnabled="true"
|
||||||
|
stdoutLogFile=".\logs\stdout">
|
||||||
|
<environmentVariables>
|
||||||
|
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
|
||||||
|
</environmentVariables>
|
||||||
|
</aspNetCore>
|
||||||
|
|
||||||
|
<security>
|
||||||
|
<requestFiltering>
|
||||||
|
<!-- IIS limit (default 30 MB) above the app limit for one photo (10 MB). -->
|
||||||
|
<requestLimits maxAllowedContentLength="31457280" />
|
||||||
|
<!-- Defense in depth, in case the handler ever fails and IIS would serve files itself: the
|
||||||
|
configuration files and the program files are never directly downloadable. -->
|
||||||
|
<hiddenSegments>
|
||||||
|
<add segment="appsettings.json" />
|
||||||
|
<add segment="appsettings.Production.json" />
|
||||||
|
<add segment="appsettings.Development.json" />
|
||||||
|
<add segment="logs" />
|
||||||
|
</hiddenSegments>
|
||||||
|
<fileExtensions>
|
||||||
|
<add fileExtension=".dll" allowed="false" />
|
||||||
|
<add fileExtension=".pdb" allowed="false" />
|
||||||
|
<add fileExtension=".exe" allowed="false" />
|
||||||
|
<add fileExtension=".config" allowed="false" />
|
||||||
|
</fileExtensions>
|
||||||
|
</requestFiltering>
|
||||||
|
</security>
|
||||||
|
|
||||||
|
<!-- Taken over from the hoster's default file -->
|
||||||
|
<directoryBrowse enabled="false" />
|
||||||
|
<httpProtocol>
|
||||||
|
<customHeaders>
|
||||||
|
<remove name="X-Powered-By" />
|
||||||
|
</customHeaders>
|
||||||
|
</httpProtocol>
|
||||||
|
<httpErrors errorMode="DetailedLocalOnly" existingResponse="Auto" />
|
||||||
|
</system.webServer>
|
||||||
|
</location>
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user