OpenRIMS-RPM - Installation Part 3: Difference between revisions
Khoppenworth (talk | contribs) No edit summary |
Khoppenworth (talk | contribs) |
||
Line 28: | Line 28: | ||
<rules> | <rules> | ||
<rule name="Reverse Proxy to www. | <rule name="Reverse Proxy to www.yourdomain.xyz" stopProcessing="true"> | ||
<match url="mozambique/.*" /> | <match url="mozambique/.*" /> | ||
Line 34: | Line 34: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^www. | <add input="{HTTP_HOST}" pattern="^www.yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 42: | Line 42: | ||
</rule> | </rule> | ||
<rule name="Reverse Proxy to www. | <rule name="Reverse Proxy to www.yourdomain.xyz" stopProcessing="true"> | ||
<match url=".*" /> | <match url=".*" /> | ||
Line 48: | Line 48: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^www. | <add input="{HTTP_HOST}" pattern="^www.yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
<action type="Rewrite" url="<nowiki>http://localhost:8081 | <action type="Rewrite" url="<nowiki>http://localhost:8081/{R:0}</nowiki>" /> | ||
</rule> | </rule> | ||
<rule name="Reverse Proxy to | <rule name="Reverse Proxy to yourdomain.xyz/mozambique" stopProcessing="true"> | ||
<match url="mozambique/.*" /> | <match url="mozambique/.*" /> | ||
Line 62: | Line 62: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^ | <add input="{HTTP_HOST}" pattern="^yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 70: | Line 70: | ||
</rule> | </rule> | ||
<rule name="Reverse Proxy to | <rule name="Reverse Proxy to yourdomain.xyz" stopProcessing="true"> | ||
<match url=".*" /> | <match url=".*" /> | ||
Line 76: | Line 76: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^ | <add input="{HTTP_HOST}" pattern="^yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 84: | Line 84: | ||
</rule> | </rule> | ||
<rule name="Reverse Proxy to eperm. | <rule name="Reverse Proxy to eperm.yourdomain.xyz" stopProcessing="true"> | ||
<match url=".*" /> | <match url=".*" /> | ||
Line 90: | Line 90: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^eperm. | <add input="{HTTP_HOST}" pattern="^eperm.yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 98: | Line 98: | ||
</rule> | </rule> | ||
<rule name="Reverse Proxy to anarme. | <rule name="Reverse Proxy to anarme.yourdomain.xyz" stopProcessing="true"> | ||
<match url=".*" /> | <match url=".*" /> | ||
Line 104: | Line 104: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^anarme. | <add input="{HTTP_HOST}" pattern="^anarme.yourdomain.xyz$" /> | ||
</conditions> | </conditions> |
Revision as of 20:17, 14 August 2023
Install as a service
For Linux the official guide is here https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html#deployment.installing.nix-services.system-d
For Windows the official guide is here https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html#deployment.installing.windows-services
Examples of the configurations are in the binary distributive on https://github.com/MSH/OpenRIMS/tree/main/bin. The folders are “windows” and “linux”.
Provide access from the Internet
To provide access from the Internet it will be a good idea to establish a proxy gateway like Nginx or Apache2. The example of virtual server configuration for Apache 2 is in the binary distributive, folder “Linux”.
IIS as a gateway for Spring Boot application
Redirect rules, URL rewrite module
Special configurations
https://serverfault.com/questions/936922/setting-up-iis-reverse-proxy-to-preserve-host-headers
Example of web.config for the default IIS site
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Reverse Proxy to www.yourdomain.xyz" stopProcessing="true">
<match url="mozambique/.*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.yourdomain.xyz$" />
</conditions>
<action type="Rewrite" url="http://localhost:8081/{R:0}" />
</rule>
<rule name="Reverse Proxy to www.yourdomain.xyz" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.yourdomain.xyz$" />
</conditions>
<action type="Rewrite" url="http://localhost:8081/{R:0}" />
</rule>
<rule name="Reverse Proxy to yourdomain.xyz/mozambique" stopProcessing="true">
<match url="mozambique/.*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^yourdomain.xyz$" />
</conditions>
<action type="Rewrite" url="http://localhost:8081/{R:0}" />
</rule>
<rule name="Reverse Proxy to yourdomain.xyz" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^yourdomain.xyz$" />
</conditions>
<action type="Rewrite" url="http://localhost:8081/mozambique/{R:0}" />
</rule>
<rule name="Reverse Proxy to eperm.yourdomain.xyz" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^eperm.yourdomain.xyz$" />
</conditions>
<action type="Rewrite" url="http://localhost:8082/{R:0}" />
</rule>
<rule name="Reverse Proxy to anarme.yourdomain.xyz" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^anarme.yourdomain.xyz$" />
</conditions>
<action type="Rewrite" url="http://localhost:8083/{R:0}" />
</rule>
<rule name="PViMS HTTP to HTTPS Redirect" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<tracing>
<traceFailedRequests>
<add path="*">
<traceAreas>
<add provider="WWW Server" areas="Rewrite" verbosity="Verbose" />
</traceAreas>
<failureDefinitions timeTaken="00:00:00" statusCodes="404, 500" />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
</configuration>
[1] The theory is here https://developers.google.com/identity/protocols/oauth2. OpenRIMS uses the web-server applications scenario.