OpenRIMS-RPM - Installation Part 3: Difference between revisions
(Installation Guide Part 2) |
Khoppenworth (talk | contribs) m (Khoppenworth moved page OpenRIMS - Installation Part 3 to OpenRIMS-RPM - Installation Part 3) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Install as a service == | == 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 == | == 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 = | = IIS as a gateway for Spring Boot application = | ||
Line 32: | Line 15: | ||
== Special configurations == | == 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 == | == Example of web.config for the default IIS site == | ||
Line 45: | 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 51: | Line 34: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^www. | <add input="{HTTP_HOST}" pattern="^www.yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 59: | 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 65: | 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 79: | Line 62: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^ | <add input="{HTTP_HOST}" pattern="^yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 87: | Line 70: | ||
</rule> | </rule> | ||
<rule name="Reverse Proxy to | <rule name="Reverse Proxy to yourdomain.xyz" stopProcessing="true"> | ||
<match url=".*" /> | <match url=".*" /> | ||
Line 93: | Line 76: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^ | <add input="{HTTP_HOST}" pattern="^yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 101: | 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 107: | Line 90: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^eperm. | <add input="{HTTP_HOST}" pattern="^eperm.yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 115: | 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 121: | Line 104: | ||
<conditions> | <conditions> | ||
<add input="{HTTP_HOST}" pattern="^anarme. | <add input="{HTTP_HOST}" pattern="^anarme.yourdomain.xyz$" /> | ||
</conditions> | </conditions> | ||
Line 170: | Line 153: | ||
</configuration> | </configuration> | ||
----[1] The theory is here | ----[1] The theory is here https://developers.google.com/identity/protocols/oauth2. OpenRIMS uses the web-server applications scenario. |
Latest revision as of 20:19, 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.