Skip to content

Commit

Permalink
Add Windows IIS to docs (loic-sharma#203)
Browse files Browse the repository at this point in the history
* Add Windows IIS to docs

Added Windows IIS proxy instructions and powershell import of previous or new packages to documentation

* Add Windows IIS to docs revision
  • Loading branch information
jsreynolds authored and loic-sharma committed Feb 10, 2019
1 parent 2df6759 commit 6b65c0a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
45 changes: 45 additions & 0 deletions docs/windows/iis-proxy.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6b65c0a

Please sign in to comment.