Nginx
This is an example of DNS based proxying with Nginx.
/etc/nginx/cond.d/OliveTin.conf
Unresolved include directive in modules/ROOT/pages/reverse-proxies/nginx.adoc - include::etc/reverse_proxy_nginx_dns.conf[]
Custom paths
These "custom path" instructions are for when you want to use OliveTin with a custom path like "apps.example.com/olivetin" instead of the root path + DNS name - eg: "olivetin.example.com". Generally it is not recommended to use a custom path for OliveTin. Instructions are provided below though, and it mostly-works.
nginx.conf
....
location /OliveTin/ {
proxy_pass http://localhost:1337/;
proxy_redirect http://localhost:1337/ http://localhost/OliveTin/;
}
location /OliveTin/websocket {
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "upgrade";
proxy_pass http://localhost:1337/websocket;
}
....
Note, because you are changing the default path (from /
to /OliveTin/
), you will need to tell the OliveTin webUI where to find the API.
You need to also set externalRestAddress
in your config.yaml like this;
OliveTin config.yaml
externalRestAddress: http://myserver/OliveTin