forked from harvard-nrg/lochness
-
Notifications
You must be signed in to change notification settings - Fork 1
Data Entry Trigger
Tashrif Billah edited this page Oct 27, 2021
·
7 revisions
To send REDCap data entry trigger to a server, you should relax SELinux policy first. Then you can set up your server through Nginx proxy or directly. Nginx proxy is the secure and recommended way. Direct way is non-secure and should be used for debugging purposes only.
setsebool httpd_can_network_connect 1
To retain the above modification after reboot, you can define a cron job:
# switch to root user
sudo su -
# install the new cron job
crontab -e
# you are in a visual editor now
# insert the following at the end of the file, save, and exit
@ reboot setsebool httpd_can_network_connect 1
Before setting up your server in either way, make sure lochness
is listening to port 9999.
- Install nginx:
yum install nginx
- Enable it to auto-start upon reboot:
systemctl enable nginx
-
location
block innginx.conf
:
server {
...
location /redcap {
proxy_pass http://localhost:9999/;
}
...
}
-
service nginx restart
-
Test data entry trigger from within REDCap using the URL
http://my.server.com/redcap
~
- Open port 9999 through firewall:
firewall-cmd --permanent --add-port=9999/tcp
- Test data entry trigger from within REDCap using the URL
http://my.server.com:9999
~
~ You are welcome to use https protocol if Nginx is configured accordingly.