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

**URL:** https://meta.discourse.org/t/all-users-have-the-same-ip-the-servers-ip/25850
**Category:** Self-hosting
**Created:** [March 1, 2015, 9:52am UTC](https://meta.discourse.org/t/all-users-have-the-same-ip-the-servers-ip/25850 "2015-03-01T09:52:20Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![LuaTenshi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luatenshi/32/51081_2.png) [@LuaTenshi](https://meta.discourse.org/u/LuaTenshi)
#### Post date: [March 1, 2015, 10:29pm UTC](https://meta.discourse.org/t/all-users-have-the-same-ip-the-servers-ip/25850/5 "2015-03-01T22:29:29Z")

</div>

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](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…

---

_[View the full topic](https://meta.discourse.org/t/all-users-have-the-same-ip-the-servers-ip/25850)._
