• Nginx as proxy?

    From Tmccaf@VERT to All on Fri Feb 6 13:02:22 2026
    I am trying to figure out how to use Nginx as proxy. I tried the following and get 502 Bad Gateway.

    I changed Http port of SBBS to 8088.

    server {
    server_name galaxybbs.net www.galaxybbs.net;

    listen 11235 ssl;
    location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass http://myprivateipofmachine:1213;
    }

    location ^~ /webbbs {
    try_files $uri @app;
    }
    location @app {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://http://myprivateipofmachine:8088;
    proxy_redirect off;
    rewrite /webbbs(.*) /$1 break;
    }
    # api call seems to be absolute, so you must alias /api/ url's
    location /api/ {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    proxy_pass http://http://myprivateipofmachine/api/;

    ---
    ï¿­ Synchronet ï¿­ Vertrauen ï¿­ Home of Synchronet ï¿­ [vert/cvs/bbs].synchro.net
  • From The Wanderer@VERT/YAKKING to Tmccaf on Fri Feb 6 14:08:02 2026
    Re: Nginx as proxy?
    By: Tmccaf to All on Fri Feb 06 2026 01:02 pm


    Your nginx setup seems overly complicated, especially as a starting point.

    My is:

    location / {

    proxy_pass http://127.0.0.1:8080;
    proxy_http_version 1.1;
    proxy_redirect off;

    # If it's behind another reverse proxy or CDN, remove the following.
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Proto $scheme;

    }

    sbbs is listening on 8080 in my setup

    I would suggest this is a pretty simple starting point, and of course you can get fancier as you need or want along the way.

    ---
    þ Synchronet þ We're yakking at Yak Station BBS