-1

I just bought the domain xappspot.com, and what I'd like to do is proxy request to it to appspot.com.

For example:

http://json-time.xappspot.com/time.json -> http://json-time.appspot.com/time.json

How could I configure nginx to do this? I searched for a while and can't find resouces to pass the subdomain. thanks!

wong2
  • 313
  • 1
  • 3
  • 12

1 Answers1

0

The common way to configure such a thing in nginx is to use the proxy_pass directive.

Something like :

server {
   listen 80;
   server_name json-time.xappspot.com;

   location / {
      proxy_pass http://json-time.appspot.com;
   }
}
krisFR
  • 13,280
  • 4
  • 36
  • 42