Running BeyondCron behind a reverse proxy
Issue
When visiting the BeyondCron console your web browser returns the message "Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js?v=..."
This is most likely caused by running BeyondCron behind a reverse proxy such as NGINX, possibly to ensure that BeyondCron sessions are protected by https.
Solution 1
The easiest solution is to ensure that BeyondCron is listening on host:port/... rather than host:port/parent/...
If sharing a host with other web services:
- define a DNS alias for BeyondCron. e.g. bc-host
- define a virtual host within NGINX as follows:
server {
server_name
bc-host.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
Solution 2
If it is not possible to define a new host within DNS, define the following locations within NGINX:
server {
server_name host.example.com;
...
location /beyondcron {
proxy_pass http://127.0.0.1:8080;
}
location /VAADIN {
proxy_pass http://127.0.0.1:8080;
}
location /PUSH {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
location /UIDL {
proxy_pass http://127.0.0.1:8080;
}
...
}