Fossil SCM
Assorted improvements to www/server/windows/iis.md. Removed the empty CGI and SCGI sections, as those will be separate articles. Added "Why Bother?" section. Added link to ./service.md. Better explanation of the /code rewriting example. Hoist TLS info up into the new "Why Bother?" section.
Commit
1670e5fac609dba40405cc4a3ecf66bb4f7c6faeb2ccc05d5150aa5e4d9ef1e6
Parent
0f217e89f27e80e…
1 file changed
+47
-33
+47
-33
| --- www/server/windows/iis.md | ||
| +++ www/server/windows/iis.md | ||
| @@ -1,42 +1,62 @@ | ||
| 1 | 1 | # Serving via IIS |
| 2 | 2 | |
| 3 | -IIS offers several different ways of running Fossil, more than we cover | |
| 4 | -here. This document gives only the most widely useful options, in order | |
| 5 | -of complexity. | |
| 6 | - | |
| 7 | - | |
| 8 | -## CGI | |
| 9 | - | |
| 10 | -*TODO* | |
| 11 | - | |
| 12 | - | |
| 13 | -## SCGI | |
| 14 | - | |
| 15 | -*TODO* | |
| 16 | - | |
| 17 | - | |
| 18 | -## HTTP | |
| 19 | - | |
| 20 | -The following assumes you have the Fossil HTTP server running in the | |
| 21 | -background, serving some local repository, bound to localhost on a fixed | |
| 22 | -high-numbered TCP port. The following command in `cmd.exe` or PowerShell | |
| 23 | -will do that: | |
| 3 | +## Why Bother? | |
| 4 | + | |
| 5 | +The first part of the scheme below sets Fossil up as an HTTP server, so | |
| 6 | +you might be wondering why you wouldn’t just modify that to make it | |
| 7 | +listen on all network interfaces on TCP port 80, so you can avoid the | |
| 8 | +need for IIS entirely. For simple use cases, you can indeed do without | |
| 9 | +IIS, but there are several use cases where adding it is helpful: | |
| 10 | + | |
| 11 | +1. Proxying Fossil with IIS lets you [add TLS encryption][tls], which | |
| 12 | + [Fossil does not currently speak](../../ssl.wiki) in its server role. | |
| 13 | + | |
| 14 | +2. The URL rewriting we do below allows Fossil to be part of a larger | |
| 15 | + site already being served with IIS. | |
| 16 | + | |
| 17 | +3. You can have a mixed-mode site, with Fossil acting as a powerful | |
| 18 | + dynamic content management service and IIS as a fast static content | |
| 19 | + server. The pure-Fossil alternative requires that you check all of | |
| 20 | + your static content into Fossil as versioned or unversioned | |
| 21 | + artifacts. | |
| 22 | + | |
| 23 | +This article shows how you can get any combination of those benefits by | |
| 24 | +using IIS as a reverse proxy for `fossil server`. | |
| 25 | + | |
| 26 | + | |
| 27 | +## Background Fossil Service Setup | |
| 28 | + | |
| 29 | +You will need to have the Fossil HTTP server running in the background, | |
| 30 | +serving some local repository, bound to localhost on a fixed | |
| 31 | +high-numbered TCP port. For the purposes of testing, simply start it by | |
| 32 | +hand in your command shell of choice: | |
| 24 | 33 | |
| 25 | 34 | fossil serve --port 9000 --localhost repo.fossil |
| 26 | 35 | |
| 27 | 36 | That command assumes you’ve got `fossil.exe` in your `%PATH%` and you’re |
| 28 | 37 | in a directory holding `repo.fossil`. See [the platform-independent |
| 29 | 38 | instructions](../any/none.md) for further details. |
| 39 | + | |
| 40 | +For a more robust setup, we recommend that you [install Fossil as a | |
| 41 | +Windows service](./service.md), which will allow Fossil to start at | |
| 42 | +system boot, before anyone has logged in interactively. | |
| 43 | + | |
| 44 | + | |
| 45 | +## Reverse Proxy with URL Rewriting | |
| 30 | 46 | |
| 31 | 47 | The stock IIS setup doesn’t have reverse proxying features, but they’re |
| 32 | 48 | easily added through extensions. You will need to install the |
| 33 | 49 | [Application Request Routing][arr] and [URL Rewrite][ure] extensions. In |
| 34 | 50 | my testing here, URL Rewrite showed up immediately after installing it, |
| 35 | 51 | but I had to reboot the server to get ARR to show up. (Yay Windows.) |
| 36 | 52 | |
| 37 | -In IIS Manager: | |
| 53 | +You can install these things through the direct links above, or you can | |
| 54 | +do it via the Web Platform Installer feature of IIS Manager (a.k.a. | |
| 55 | +`INETMGR`). | |
| 56 | + | |
| 57 | +Now you can set these extensions up in IIS Manager: | |
| 38 | 58 | |
| 39 | 59 | 1. Double-click the “Application Request Routing Cache” icon. |
| 40 | 60 | |
| 41 | 61 | 2. Right-click in the window that results, and select “Server Proxy |
| 42 | 62 | Settings...” |
| @@ -64,22 +84,16 @@ | ||
| 64 | 84 | should see your Fossil repository’s web interface instead of the default |
| 65 | 85 | IIS web site, as before you did all of the above. |
| 66 | 86 | |
| 67 | 87 | This is a very simple configuration. You can do more complicated and |
| 68 | 88 | interesting things with this, such as redirecting only `/code` URLs to |
| 69 | -Fossil, letting everything else go to IIS for normal web serving. You | |
| 70 | -could set up a mixed static and ASP.NET site on the rest of the URL | |
| 71 | -space, with Fossil serving only that one part. See the documentation on | |
| 72 | -[URL Rewrite rules][urr] for more ideas. | |
| 73 | - | |
| 74 | - | |
| 75 | -## Enabling TLS | |
| 76 | - | |
| 77 | -Once you have one of the above options enabled, you might then want to | |
| 78 | -use IIS as an HTTPS proxy layer. For now, we’ll just send you to [the | |
| 79 | -docs][tls] for that. | |
| 89 | +Fossil by setting the Pattern in step 6 to “`^/code(.*)$`”. IIS would | |
| 90 | +then directly serve all other URLs. You could also intermix ASP.NET | |
| 91 | +applications in the URL scheme in this way. | |
| 92 | + | |
| 93 | +See the documentation on [URL Rewrite rules][urr] for more ideas. | |
| 80 | 94 | |
| 81 | 95 | |
| 82 | 96 | [arr]: https://www.iis.net/downloads/microsoft/application-request-routing |
| 83 | 97 | [tls]: https://docs.microsoft.com/en-us/iis/manage/configuring-security/understanding-iis-url-authorization |
| 84 | 98 | [ure]: https://www.iis.net/downloads/microsoft/url-rewrite |
| 85 | 99 | [urr]: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module |
| 86 | 100 |
| --- www/server/windows/iis.md | |
| +++ www/server/windows/iis.md | |
| @@ -1,42 +1,62 @@ | |
| 1 | # Serving via IIS |
| 2 | |
| 3 | IIS offers several different ways of running Fossil, more than we cover |
| 4 | here. This document gives only the most widely useful options, in order |
| 5 | of complexity. |
| 6 | |
| 7 | |
| 8 | ## CGI |
| 9 | |
| 10 | *TODO* |
| 11 | |
| 12 | |
| 13 | ## SCGI |
| 14 | |
| 15 | *TODO* |
| 16 | |
| 17 | |
| 18 | ## HTTP |
| 19 | |
| 20 | The following assumes you have the Fossil HTTP server running in the |
| 21 | background, serving some local repository, bound to localhost on a fixed |
| 22 | high-numbered TCP port. The following command in `cmd.exe` or PowerShell |
| 23 | will do that: |
| 24 | |
| 25 | fossil serve --port 9000 --localhost repo.fossil |
| 26 | |
| 27 | That command assumes you’ve got `fossil.exe` in your `%PATH%` and you’re |
| 28 | in a directory holding `repo.fossil`. See [the platform-independent |
| 29 | instructions](../any/none.md) for further details. |
| 30 | |
| 31 | The stock IIS setup doesn’t have reverse proxying features, but they’re |
| 32 | easily added through extensions. You will need to install the |
| 33 | [Application Request Routing][arr] and [URL Rewrite][ure] extensions. In |
| 34 | my testing here, URL Rewrite showed up immediately after installing it, |
| 35 | but I had to reboot the server to get ARR to show up. (Yay Windows.) |
| 36 | |
| 37 | In IIS Manager: |
| 38 | |
| 39 | 1. Double-click the “Application Request Routing Cache” icon. |
| 40 | |
| 41 | 2. Right-click in the window that results, and select “Server Proxy |
| 42 | Settings...” |
| @@ -64,22 +84,16 @@ | |
| 64 | should see your Fossil repository’s web interface instead of the default |
| 65 | IIS web site, as before you did all of the above. |
| 66 | |
| 67 | This is a very simple configuration. You can do more complicated and |
| 68 | interesting things with this, such as redirecting only `/code` URLs to |
| 69 | Fossil, letting everything else go to IIS for normal web serving. You |
| 70 | could set up a mixed static and ASP.NET site on the rest of the URL |
| 71 | space, with Fossil serving only that one part. See the documentation on |
| 72 | [URL Rewrite rules][urr] for more ideas. |
| 73 | |
| 74 | |
| 75 | ## Enabling TLS |
| 76 | |
| 77 | Once you have one of the above options enabled, you might then want to |
| 78 | use IIS as an HTTPS proxy layer. For now, we’ll just send you to [the |
| 79 | docs][tls] for that. |
| 80 | |
| 81 | |
| 82 | [arr]: https://www.iis.net/downloads/microsoft/application-request-routing |
| 83 | [tls]: https://docs.microsoft.com/en-us/iis/manage/configuring-security/understanding-iis-url-authorization |
| 84 | [ure]: https://www.iis.net/downloads/microsoft/url-rewrite |
| 85 | [urr]: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module |
| 86 |
| --- www/server/windows/iis.md | |
| +++ www/server/windows/iis.md | |
| @@ -1,42 +1,62 @@ | |
| 1 | # Serving via IIS |
| 2 | |
| 3 | ## Why Bother? |
| 4 | |
| 5 | The first part of the scheme below sets Fossil up as an HTTP server, so |
| 6 | you might be wondering why you wouldn’t just modify that to make it |
| 7 | listen on all network interfaces on TCP port 80, so you can avoid the |
| 8 | need for IIS entirely. For simple use cases, you can indeed do without |
| 9 | IIS, but there are several use cases where adding it is helpful: |
| 10 | |
| 11 | 1. Proxying Fossil with IIS lets you [add TLS encryption][tls], which |
| 12 | [Fossil does not currently speak](../../ssl.wiki) in its server role. |
| 13 | |
| 14 | 2. The URL rewriting we do below allows Fossil to be part of a larger |
| 15 | site already being served with IIS. |
| 16 | |
| 17 | 3. You can have a mixed-mode site, with Fossil acting as a powerful |
| 18 | dynamic content management service and IIS as a fast static content |
| 19 | server. The pure-Fossil alternative requires that you check all of |
| 20 | your static content into Fossil as versioned or unversioned |
| 21 | artifacts. |
| 22 | |
| 23 | This article shows how you can get any combination of those benefits by |
| 24 | using IIS as a reverse proxy for `fossil server`. |
| 25 | |
| 26 | |
| 27 | ## Background Fossil Service Setup |
| 28 | |
| 29 | You will need to have the Fossil HTTP server running in the background, |
| 30 | serving some local repository, bound to localhost on a fixed |
| 31 | high-numbered TCP port. For the purposes of testing, simply start it by |
| 32 | hand in your command shell of choice: |
| 33 | |
| 34 | fossil serve --port 9000 --localhost repo.fossil |
| 35 | |
| 36 | That command assumes you’ve got `fossil.exe` in your `%PATH%` and you’re |
| 37 | in a directory holding `repo.fossil`. See [the platform-independent |
| 38 | instructions](../any/none.md) for further details. |
| 39 | |
| 40 | For a more robust setup, we recommend that you [install Fossil as a |
| 41 | Windows service](./service.md), which will allow Fossil to start at |
| 42 | system boot, before anyone has logged in interactively. |
| 43 | |
| 44 | |
| 45 | ## Reverse Proxy with URL Rewriting |
| 46 | |
| 47 | The stock IIS setup doesn’t have reverse proxying features, but they’re |
| 48 | easily added through extensions. You will need to install the |
| 49 | [Application Request Routing][arr] and [URL Rewrite][ure] extensions. In |
| 50 | my testing here, URL Rewrite showed up immediately after installing it, |
| 51 | but I had to reboot the server to get ARR to show up. (Yay Windows.) |
| 52 | |
| 53 | You can install these things through the direct links above, or you can |
| 54 | do it via the Web Platform Installer feature of IIS Manager (a.k.a. |
| 55 | `INETMGR`). |
| 56 | |
| 57 | Now you can set these extensions up in IIS Manager: |
| 58 | |
| 59 | 1. Double-click the “Application Request Routing Cache” icon. |
| 60 | |
| 61 | 2. Right-click in the window that results, and select “Server Proxy |
| 62 | Settings...” |
| @@ -64,22 +84,16 @@ | |
| 84 | should see your Fossil repository’s web interface instead of the default |
| 85 | IIS web site, as before you did all of the above. |
| 86 | |
| 87 | This is a very simple configuration. You can do more complicated and |
| 88 | interesting things with this, such as redirecting only `/code` URLs to |
| 89 | Fossil by setting the Pattern in step 6 to “`^/code(.*)$`”. IIS would |
| 90 | then directly serve all other URLs. You could also intermix ASP.NET |
| 91 | applications in the URL scheme in this way. |
| 92 | |
| 93 | See the documentation on [URL Rewrite rules][urr] for more ideas. |
| 94 | |
| 95 | |
| 96 | [arr]: https://www.iis.net/downloads/microsoft/application-request-routing |
| 97 | [tls]: https://docs.microsoft.com/en-us/iis/manage/configuring-security/understanding-iis-url-authorization |
| 98 | [ure]: https://www.iis.net/downloads/microsoft/url-rewrite |
| 99 | [urr]: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module |
| 100 |