Maxim Dounin
April 14, 2010 04:44AM
Hello!

On Tue, Apr 13, 2010 at 11:34:45PM -0400, stunti wrote:

> I have a setup where my nginx is in front with apache+PHP
> behind.
>
> My PHP application cache some page in memcache which are
> accessed by nginx directly except some dynamic part which are
> build using SSI in Nginx.
>
> The first problem I had was nginx didnt try to use memcache for
> ssi URI.
>
> <!--# include virtual="/myuser" -->

What do you mean by "didnt try to use memcache"?

> So I figured that if I force it to use a full URL, it would do
> it.
>
> <!--# include virtual="http://www.example.com/myuser" -->

No, it wouldn't. SSI only supports URI local to server in
question (i.e. path only). If you need to include some external
URL you have to configure appropriate proxy_pass. E.g.

<!--#include virtual="/example-com-myuser" -->

and in nginx.conf:

location = /example-com-myuser {
proxy_pass http://www.example.com/myuser;
}

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx + ssi + remote uri access does not work

stunti April 13, 2010 11:34PM

Re: nginx + ssi + remote uri access does not work

Maxim Dounin April 14, 2010 04:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready