Browse Source

Merge pull request #25685 from abpframework/maliming/docs-iis-not-tiered-appsettings

Add non-tiered `appsettings` example to the IIS deployment docs
pull/25689/head
Engincan VESKE 6 days ago
committed by GitHub
parent
commit
0fa4e70ae5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 47
      docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md

47
docs/en/solution-templates/layered-web-application/deployment/deployment-iis.md

@ -134,7 +134,7 @@ You can execute this command in your command prompt.
````bash
cd Desktop # or another path
mkcert -pkcs12 auth.sample api.sample web.sample # Replace with your domain names
mkcert -pkcs12 {{ if Tiered == "Yes" }}auth.sample api.sample web.sample{{ else if UI == "NG" || UI == "Blazor" }}www.sample app.sample{{ else }}www.sample{{ end }} # Replace with your domain names
````
Rename the created file extension to ".pfx"
@ -147,19 +147,33 @@ Import the certificate to IIS
Add domain names to hosts file(in Windows: `C:\Windows\System32\drivers\etc\hosts`, in Linux and macOS: `/etc/hosts`).
{{ if Tiered == "Yes" }}
> For example, in a tiered MVC project.
````json
127.0.0.1 auth.sample
127.0.0.1 api.sample
127.0.0.1 web.sample
````
{{ else }}
````json
127.0.0.1 www.sample{{ if UI == "NG" || UI == "Blazor" }}
127.0.0.1 app.sample{{ end }}
````
{{ end }}
## Publish the Application(s) On IIS
### Update the appsettings
Update the appsettings according to your project type and domain names.
{{ if Tiered == "Yes" }}
> For example, in a tiered MVC project.
````json
@ -237,6 +251,37 @@ Update the appsettings according to your project type and domain names.
}
````
{{ else }}
> In a non-tiered solution there is a single application that also acts as the authentication server, so `App:SelfUrl` and `AuthServer:Authority` point to the same URL.
````json
//{{ if UI == "NG" || UI == "Blazor" }}HttpApi.Host{{ else if UI == "BlazorServer" }}Blazor{{ else }}Web{{ end }}
{
"App": {
"SelfUrl": "https://www.sample",{{ if UI == "NG" || UI == "Blazor" }}
"CorsOrigins": "https://app.sample",
"RedirectAllowedUrls": "https://app.sample",{{ else if UI == "BlazorServer" }}
"RedirectAllowedUrls": "https://www.sample",{{ end }}
"DisablePII": "false"{{ if UI == "NG" || UI == "Blazor" }},
"HealthCheckUrl": "/health-status"{{ end }}
},
"ConnectionStrings": {
"Default": "Server=volo.sample;Database=Sample;User Id=sa;Password=1q2w3E**;TrustServerCertificate=true"
},
"AuthServer": {
"Authority": "https://www.sample",
"RequireHttpsMetadata": "true"{{ if UI == "NG" || UI == "Blazor" }},
"SwaggerClientId": "Sample_Swagger"{{ end }}
},
"StringEncryption": {
"DefaultPassPhrase": "f9uRkTLdtAZLmlh3"
}
}
````
{{ end }}
### Copy the .pfx file
You need to copy pfx file from ./src/{{ if Tiered == "Yes" }}AuthServer{{ else if UI == "NG" || UI == "Blazor" }}HttpApi.Host{{ else if UI == "BlazorServer" }}Blazor{{ else }}Web{{ end }} to ./publish/{{ if Tiered == "Yes" }}authserver{{ else if UI == "NG" || UI == "Blazor" }}apihost{{ else if UI == "BlazorServer" }}blazor{{ else }}web{{ end }} folder.

Loading…
Cancel
Save