# Setting up Reverse Proxy with Namecheap

**URL:** <https://www.ruby-forum.com/t/setting-up-reverse-proxy-with-namecheap/243694>\
**Category:** NGINX\
**Created:** [December 22, 2015, 1:30am UTC](https://www.ruby-forum.com/t/setting-up-reverse-proxy-with-namecheap/243694 "2015-12-22T01:30:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [December 22, 2015, 1:30am UTC](https://www.ruby-forum.com/t/setting-up-reverse-proxy-with-namecheap/243694/1 "2015-12-22T01:30:12Z")

</div>

I’m running a site on my local network which I would like to access via  
a  
reverse proxy to a domain I purchased on namecheap. I’m using nginx on  
my  
freenas machine. The site is running locally at 192.168.1.7:8080. I do  
not  
know if my conf is correct or how to set up namecheap so that I can go  
to  
[mysite.mydomain.com](http://mysite.mydomain.com) or [mydomain.com/mysite](http://mydomain.com/mysite). Any help would be greatly  
appreciated. Below is the conf I made.

worker\_processes 1;

events {  
worker\_connections 1024;  
}

http {  
include mime.types;  
default\_type application/octet-stream;  
sendfile on;  
keepalive\_timeout 65;

```
server {
    listen 80;
    server_name www.mydomain.com;

    location /mysite {
        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://192.168.1.7:8080;

```

}  
# redirect server error pages to the static page /50x.html  
#  
error\_page 500 502 503 504 /50x.html;  
location = /50x.html {  
root /usr/local/www/nginx-dist;  
}  
}  
}

Posted at Nginx Forum:

> **[Setting up Reverse Proxy with Namecheap](https://forum.nginx.org/read.php?2,263618,263618#msg-263618)**
>
> I'm running a site on my local network which I would like to access via a reverse proxy to a domain I purchased on namecheap. I'm using nginx on my freenas machine. The site is running locally at 192.168.1.7:8080. I do not know if my conf is correct...
