# Nginx + ssi + remote uri access does not work

**URL:** <https://www.ruby-forum.com/t/nginx-ssi-remote-uri-access-does-not-work/186909>\
**Category:** NGINX\
**Created:** [April 14, 2010, 5:35am UTC](https://www.ruby-forum.com/t/nginx-ssi-remote-uri-access-does-not-work/186909 "2010-04-14T05:35:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stunti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@stunti](https://www.ruby-forum.com/u/stunti)\
**Post date:** [April 14, 2010, 5:35am UTC](https://www.ruby-forum.com/t/nginx-ssi-remote-uri-access-does-not-work/186909/1 "2010-04-14T05:35:38Z")

</div>

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.

So I figured that if I force it to use a full URL, it would do it.

But in logs file (both nginx and apache) I can see that a slash has been  
added at the beginning of the url

http ssi filter “/[http://www.example.com/myuser](http://www.example.com/myuser)”

In the source code of the SSI module I see a PREFIX that seems to be  
added, but I can really tell if I can disable it.

Anybody got this issue? Nginx version : 0.7.62 on Ubuntu Karmic 64bits

Thanks a lot

Posted at Nginx Forum:

> **[nginx + ssi + remote uri access does not work](https://forum.nginx.org/read.php?2,74756,74756#msg-74756)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![stunti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@stunti](https://www.ruby-forum.com/u/stunti)\
**Post date:** [April 14, 2010, 10:40am UTC](https://www.ruby-forum.com/t/nginx-ssi-remote-uri-access-does-not-work/186909/2 "2010-04-14T10:40:02Z")

</div>

Hello!

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

> 

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.

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 D.
