1

I have some sites I want to redirect with nginx:

domain.com:1180 -> test.domain.com (static site)

domain.com:1280 -> test.domain.com/promo (meteor.js website)

On domain.com I have an nginx server with the following site enabled:

server {
   listen      80;
   server_name test.domain.com;


   location /install {
        proxy_pass http://domain.com:1380;
   }

   location / {
        proxy_pass http://domain.com:1280;
   }



}

Anyhow it doesnt work. I can make it work one site at the time, but if I insert both the meteor dynamic site stops working. It seems like it pass the location as a parameter. What am I doing wrong? Should I user proxy_redirect or rewrite?

Mascarpone
  • 872
  • 3
  • 9
  • 27

1 Answers1

1

I found the solution myself:

1) The Nginx configuration is correct

2) Meteor requires to be launched with the parameter Root URL.

ROOT_URL=http://site.url/subfolder meteor
Mascarpone
  • 872
  • 3
  • 9
  • 27