SSI goes to backend

Marcus Clyne maccaday at
Fri Sep 4 16:14:42 MSD 2009

> What if for example you want to ssi from a different domain name so
> the html is served from but the ssi uses
> (which is also hosted on the same nginx instance).
You could set the SSI command to

<!--# include virtual="/domain2/oth-domain-url" -->

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

This would make a sub-request for

AFAIK you need to set the domain2 statically in your config file, i.e. 
you can't use a regex in the domain name.


More information about the nginx mailing list