Proxy - nginx

stefanb

Verified User
Joined
Oct 23, 2013
Messages
7
Hello,

I want to use a proxy server for the real server so that users can check the website before the website come online, this give the users time to build the website. I no that directadmin user have ~username but this is not the best way for me.

Now i have build a other server with nginx and the following config.

server {
listen 80;

server_name www.test.web.com;

location / {

proxy_pass http://www.realdomainname.com;
proxy_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}

But i get every time the link from the real domainname when i want push a button on the website, i have searching a lot of time, but i see its at this time not any more what problem are.
 
Hello,

Check this module http://nginx.org/en/docs/http/ngx_http_sub_module.html

I'd suggest that you use alias name based on your server name.
Let's say you've got:

1. client Bob with domain user-bob.com
2. server name server.my-hosting-company.com

While user Bob is working on a site building you can give him an alias:

user-bob.com.server.my-hosting-company.com

So user's domain + hostname.

That can be done automatically for every site or manually per request.
 
Back
Top