Login/password for demo TDS: boss:bossadmin

This is an example on how to setup the TDS with following requirements: Setup the TDS with the TDS control panel on one domain, actual redirections on another domains and instead of tds.com/in/scheme/ use tds.com/scheme/. Both client and standard redirects should work.

This configuration requires nginx as reverse proxy (Apache would work too, but this example is for nginx only). We have 3 domains - the control panel should work on http://bosscp.com, and redirects should be made on http://bosssrv1.com and http://bosssrv2.com. The redirects itself will work without an '/in/' prefix, you will need just a Scheme IN URL - like for example http://bosssrv1.com/somescheme/.

After you've installed the TDS according to the steps on the Installing BossTDS page (including section with nginx configuration), change your nginx config to the following:

upstream bosstds { server 127.0.0.1:18001; } server { listen 80; server_name bosscp.com; set_real_ip_from 127.0.0.1; access_log off; #speeds up static resources used in the control panel, such as js and images location /static/ { root /opt/bosstds/priv/; } #blocks all requests starting with /in/ - effectively blocks redirects location /in/ { return 404; } #allows access to the control panel location / { proxy_pass http://bosstds; proxy_http_version 1.1; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } server { listen 80; server_name bosssrv1.com bosssrv2.com; set_real_ip_from 127.0.0.1; access_log off; #prevents rewriting of urls with path equal to /in/ - for client redirects location = /in/ { proxy_pass http://bosstds; proxy_http_version 1.1; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #rewrites everything to /in/everything/ location / { rewrite ^/?(.*)$ /in/$1 break; proxy_pass http://bosstds; proxy_http_version 1.1; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
www.megastock.ru www.paypal.com www.paxum.com
Hide dock Show dock Back to top
Loading