Page 1 of 1

Vestacp a Sinusbot

Posted: Sun Nov 25, 2018 7:32 am
by Manius
Hello! I installed the Vestacp panel, and then I got to the SinusBot and the problem is I can not run SinusBot, i.e. the page under the port: 8087 works, I have access but I can not connect to TS3 servos, which is on a different machine, and where it can be problem?

Re: Vestacp a Sinusbot

Posted: Wed Nov 28, 2018 11:47 am
by theotherpeople
Run Sinusbot with docker.

Install docker

Code: Select all

curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh && rm get-docker.sh
Run sinusbot on loopback

Code: Select all

docker run -d -p 127.0.0.1:8087:8087 -v scripts:/opt/sinusbot/scrirebootpts -v data:/opt/sinusbot/data --restart always --name sinusbot sinusbot/docker
Add templates for nginx in /usr/local/vesta/data/templates/web/nginx
sinusbot.tpl

Code: Select all

server {
  listen      %ip%:80;
  server_name %domain_idn% %alias_idn%;
  location / {
    rewrite ^(.*) https://%domain_idn%$1 permanent;
  }

  include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
}
sinusbot.stpl

Code: Select all

upstream sinusbot {
  server 127.0.0.1:8087;
}

server {
  listen      %ip%:443 http2;
  server_name %domain_idn% %alias_idn%;

  access_log  /var/log/nginx/domains/%domain%.log combined;
  access_log  /var/log/nginx/domains/%domain%.bytes bytes;
  error_log   /var/log/nginx/domains/%domain%.error.log error;

  ssl         on;
  ssl_certificate      %ssl_pem%;
  ssl_certificate_key  %ssl_key%;

  location / {
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_pass http://sinusbot/;
  }

  error_page  403 /error/404.html;
  error_page  404 /error/404.html;
  error_page  500 502 503 504 /error/50x.html;

  location /error/ {
    alias   %home%/%user%/web/%domain%/document_errors/;
  }

  location ~* "/\.(htaccess|htpasswd)$" {
    deny    all;
    return  404;
  }

  location /vstats/ {
    alias   %home%/%user%/web/%domain%/stats/;
    include %home%/%user%/conf/web/%domain%.auth*;
  }

  include     %home%/%user%/conf/web/snginx.%domain%.conf*;
}
This should work