-1

I'm trying to create a proxy_pass to a sites.google.com site. It works.. kinda. The site appears somewhat different when I access it through the nginx proxy.

My configuration:

location /gtis {
    proxy_set_header HOST sites.google.com;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass https://sites.google.com/site/grupotisociedade/;
    proxy_redirect default;
}

What can be wrong?

(broken) site through proxy: Proxy

(correct) site: Original

tessiof
  • 1
  • 1
  • 2

1 Answers1

0

Some of the resources (images, css, js) will be on a different domain, ie not sites.google.com. Use something like your web browser tools or Web Page Test to work out which resources are working and which aren't, a little bit of simple problem solving should work it out. If not you'll need to post actual URLs for us to look at.

Tim
  • 31,888
  • 7
  • 52
  • 78
  • There are different domains for different resources indeed. Domains like ssl.gstatic.com and static.doubleclick.net. I need to have a proxy_set_header HOST for each of these domains? – tessiof Jul 18 '16 at 21:30
  • I have a feeling this is going to be pretty complex. Can I ask why you're trying to do this, what your business aim is? There might be a better way. – Tim Jul 18 '16 at 21:50
  • I gave up and created a simple redirect instead. Thanks anyway! – tessiof Jul 18 '16 at 22:32