You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/src/configuration/README.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,17 @@ For the desktop version of ANNIS, you most probably don't need to change any of
4
4
If you are installing ANNIS on a server however, you might want to tweak the settings.
5
5
The [Java Properties](http://en.wikipedia.org/w/index.php?title=.properties&oldid=521500688), [TOML](https://toml.io/) and [JSON](http://www.json.org/) file formats are used for different kind of configuration.
6
6
7
-
ANNIS uses the Spring Boot configuration system and thus it will search for a Java Properties based configuration file named `application.properties` in the current working directory or a `config` sub-directory of the working directory.[^working-dir]
8
-
You can also use the command line argument `--spring.config.location=file:/<location-on-disk>` to specify a specific configuration file.
7
+
ANNIS uses the Spring Boot configuration system and thus it will search for a Java Properties based configuration file named `application.properties` in the current working directory or a `config` sub-directory of the working directory.
8
+
9
+
<divclass="warning">
10
+
Depending on how you start ANNIS, the working directory can be different.
11
+
12
+
When using `java -jar /path/to/annis-server.jar`, the working directory is the same as the working directory of your current shell.
13
+
If you start ANNIS by treating it like an executable file, e.g. by running `/path/to/annis-server.jar` directly, **the directory containing the jar is used as the working directory** of the application per default.
14
+
</div>
15
+
16
+
To avoid confusion from where the file is loaded from, you can specify the configuration file location by passing the command line argument `--spring.config.location=file:/<location-on-disk>` when starting ANNIS.
17
+
9
18
More search paths for configurations files are documented in the [Spring Boot documentation](https://docs.spring.io/spring-boot/docs/2.3.x/reference/html/spring-boot-features.html#boot-features-external-config-application-property-files).
Being a Spring Boot application, ANNIS configuration properties also be directly given as [command line argument](https://docs.spring.io/spring-boot/docs/2.3.x/reference/html/spring-boot-features.html#boot-features-external-config-command-line-args).
49
-
50
-
[^working-dir]: Depending on how you start ANNIS, the working directory can be different.
51
-
When using `java -jar /path/to/annis-server.jar`, the working directory is the same as the working directory of your current shell.
52
-
If you start ANNIS by treating it like an executable file, e.g. by running `/path/to/annis-server.jar` directly, the directory containing the jar is used as the working directory of the application per default.
Copy file name to clipboardExpand all lines: docs/user-guide/src/installation/server.md
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,43 @@ This will start a REST service on port 5711 and the user interface on port 5712.
14
14
The user interface service will accept requests from all IPs and the embedded REST service only from `localhost`.
15
15
We recommend using a Nginx or Apache server as proxy for the user interface service for production to enable important features like HTTPS encryption.
16
16
17
+
## Configuring a proxy server
18
+
19
+
To configure a proxy that uses a different path than `/`, e.g. `https://example.com/annis`, first make sure that the context path is set in the [`application.properties` file](../configuration/).
20
+
21
+
```
22
+
server.servlet.context-path=/annis
23
+
```
24
+
25
+
### Nginx
26
+
27
+
You can configure the location to act as a proxy.
28
+
The `location` must match the context path and end with an `/`.
29
+
The `proxy_pass` directive does not contain the context path, but only specifies the server host and port.
30
+
31
+
```
32
+
location /annis/ {
33
+
proxy_pass http://127.0.0.1:5712;
34
+
# Optimize for Web Sockets
35
+
# https://www.nginx.com/blog/websocket-nginx/
36
+
proxy_http_version 1.1;
37
+
proxy_set_header Upgrade $http_upgrade;
38
+
proxy_set_header Connection: $connection_upgrade;
39
+
client_max_body_size 2G;
40
+
}
41
+
```
42
+
43
+
### Apache
44
+
45
+
Recent versions of Apache have support for proxying web socket connects, but the `mod_proxy` module must be enabled: <https://httpd.apache.org/docs/2.4/mod/mod_proxy.html>
46
+
47
+
Then add the following configuration to your site:
You can create a simple systemd configuration file with the name `annis.service` and save it under one of the valid configuration folders, e.g. `/etc/systemd/system` to register ANNIS as a system service.
@@ -24,7 +61,7 @@ Description=ANNIS corpus search and visualization
This configuration assumes that there is a “annis” user and group on the server.
75
+
The `WorkingDirectory` is not used to locate the `application.properties` file and thus it is best to specify its location with the `--spring.config.location` argument.
38
76
39
77
You can permanently enable this service by calling
0 commit comments