• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

nginx - reverse proxy with sinusbot?

Status
Not open for further replies.

neskire

New Member
Im hosting the sinus bot and really happy with the work you done.
Do you have any idea of how i would go about redirecting to www.mydomain.com/sinusbot instead of www.mydomain.com:8087.

I've got nginx working as a reverse proxy for quite a few applications, however when i tried this method underneath i didn't have any success.
nano /etc/nginx/sites-available/default.

location /musicbot {
proxy_pass http://192.168.1.100:8087;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}

Thanks in advanced
 

flyth

is reticulating splines
Staff member
Developer
Contributor
It's currently not possible to use a subfolder (due to some absolute references). However, you can easily use a subdomain.
 

neskire

New Member
so something along the lines of:

nano ../sites-available/sinusbot

Code:
server {
    listen   80;

    server_name musicbot.mydomain.com www.musicbot.mydomain.com;

    access_log  /var/log/nginx/musicbot_mydomain_com_access.log;
    error_log   /var/log/nginx/musicbot_mydomain_com_error.log;

    error_page 404 /404.html;

    error_page 500 502 503 504 /50x.html;

    location / {
        proxy_pass 123.123.123.123:8087;
    }

}
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Yup, something like that should work.
 
Status
Not open for further replies.
Top