All users have the same IP (the Servers IP)?

No I have not and I am not even sure on how I would do that. Plus I would like to avoid messing around with IP Tables.

I noticed that you have replied on a similar topic to this one allready…
https://meta.discourse.org/t/run-discourse-with-or-alongside-existing-apache-sites/19514

Would it be possible to do the same thing via nginx?

Edit: I have finally got it to work by using this nginx setup…

upstream discourse {
    #fail_timeout is optional; I throw it in to see errors quickly
    server 127.0.0.1:1337 fail_timeout=5;
}
 
# configure the virtual host
server {
    listen          80;
    server_name     f.example.com;
    return          301 $scheme://forums.example.com$request_uri;
}

server {
    listen 80;

    # replace with your domain name
    server_name forums.example.com;

    location / {
        proxy_redirect off;
        # pass to the upstream discourse server mentioned above
        proxy_pass http://127.0.0.1:1337;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP  $remote_addr;
    }
}

Now I just need to fix the registration IPs for my users…

1 Like