Run on 80 port, Reverse Proxy mode behind Nginx or Apache2
Nginx is the recommended server if you're going to run BossTDS in reverse proxy mode. It is
always
recomended to have Nginx in front of BossTDS, just in case.
Apache is not recomended as reverse proxy, under heavy load it will slow down your TDS and
will eat lots of RAM. Still
it is possible to use it if you really want to.
Both Nginx and Apache require the same configuration of BossTDS.
SSH to your server. Then perform the following procedure:
-
Edit your boss.config file
nano /opt/bosstds/boss.config
Find {reverse_proxy, off} option and set it to on: {reverse_proxy,
on}.
Save the file with 'Ctrl+X', 'Y', Enter
-
Restart the BossTDS
/etc/init.d/bosstds restart
Nginx server configuration:
upstream bosstds {
server 127.0.0.1:18001;
}
server {
listen 80;
server_name yourtds.yourdomain.com; #<- insert here your real domain name
set_real_ip_from 127.0.0.1;
access_log off;
location /static/ {
root /opt/bosstds/priv/;
}
location / {
proxy_pass http://bosstds;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Apache2 Virtual host configuration:
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://127.0.0.1:18001/ keepalive=Off
ProxyPassReverse / http://127.0.0.1:18001/
#replace with your real domain
ProxyPassReverseCookieDomain 127.0.0.1 yourtds.yourdomain.com
#replace with your real domain
ServerName yourtds.yourdomain.com
</VirtualHost>