diff --git a/docs/configuration.md b/docs/configuration.md index 2ff68efe..4c64098a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -16,7 +16,7 @@ To do so, you can insert the desired API key in the `ApiKey` field. Users will now have to provide the API key to push packages: -``` +```c# dotnet nuget push -s http://localhost:5000/v3/index.json -k NUGET-SERVER-API-KEY newtonsoft.json.11.0.2.nupkg ``` diff --git a/docs/windows/iis-proxy.md b/docs/windows/iis-proxy.md new file mode 100644 index 00000000..23dcbb2b --- /dev/null +++ b/docs/windows/iis-proxy.md @@ -0,0 +1,45 @@ +# Windows IIS Proxy + +Running BaGet behind IIS as a proxy on Windows may require a few extra steps, however it may be advantageous because IIS will automatically manage restarting the server for you on reboots, etc. + +## IIS Setup + +Ensure that the required [.Net Core runtime](https://dotnet.microsoft.com/download) is installed on the web server (currently known as the Windows Hosting Bundle installer). + +Copy the BaGet directory over to your hosting area such as `C:\Inetpub\wwwroot\BaGet` + +Using IIS Manager, create a new Application Pool: + +- Name = BaGetAppPool (can be whatever you want) +- .Net CLR version = No Managed Code +- Managed Pipeline Mode = Integrated +- Start application pool immediately = checked + +Using IIS Manager, create a new web site: + +- Choose your site name and physical path +- Choose BaGetAppPool as the application pool +- In the Binding area, enter the default BaGet port of 5000 + +## BaGet Folder permissions + +In order for the app to create the appropriate NuGet package folder, as well as create various files (SQLite database for example) you **may** need to give special rights to the top level BaGet folder. + +Read under, "Application Pools" and, "Application Pool Identity" [here](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2). Basically the identity used in the app pool isn't a real user account and doesn't show up in the Windows User Management Console. + +## Alternative NuGet package Storage Paths + +Note that Virtual Directories will not work with IIS and Kestrel. Read more about that [here](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2) + +Ensure that the configuration storage Path uses appropriate forward slashes in the settings such as: + +```javascript +... + "Storage": { + "Type": "FileSystem", + "Path": "C://AnotherFolder/Packages" + }, +... +``` + +Note if a folder is created outside of the BaGet top level directory, you will definitely need to adjust folder permissions stated above. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 240d56cb..b1e3f200 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -40,6 +40,7 @@ pages: - Azure: cloud/azure.md - Google Cloud: cloud/gcp.md - AWS: cloud/aws.md + - Windows IIS Proxy: windows/iis-proxy.md - Tools: - Mirroring: tools/mirroring.md - BaGet vs. Other Software: