On Fri, Sep 04, 2009 at 02:19:19PM +0300, zepolen wrote:
Thanks, that worked. Why would using the domain not work?
What if for example you want to ssi from a different domain name so
the html is served from http://www.domain.com/ but the ssi uses www.other.com (which is also hosted on the same nginx instance).
The main technical problem now is that you can not set proxy parameters
in this case and may use default ones only.
However if it gets loaded as ssi, the request seems to go to the
backend (which says 404) - instead of being served from nginx.
Thanks, that worked. Why would using the domain not work?
What if for example you want to ssi from a different domain name so
the html is served from http://www.domain.com/ but the ssi uses www.other.com (which is also hosted on the same nginx instance).
What if for example you want to ssi from a different domain name so
the html is served from http://www.domain.com/ but the ssi uses www.other.com (which is also hosted on the same nginx instance).
You could set the SSI command to
Then in your config have
location /domain2/ {
internal; # if you don’t set this location to internal then your
web server could be used as a public proxy to that domain
proxy_pass http://domain2.com;
…
}
location ~ /proxy-google/(.+) {
set $proxy_url $1;
proxy_pass http://$proxy_url;
}
and that gave the same message.
Doing a statically-defined proxy-pass like above works without the
resolver directive. I don’t have a DNS server running, but I wouldn’t
have thought that I’d need one, would I?