You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Maria Jesus Turiel <ma...@silicetelecom.com> on 2009/04/23 13:33:32 UTC
Rules to file system and Lenya
Hi again :)
I need that some url on my Portal get files on file system but no
through lenya.
I have read documents in
http://lenya.apache.org/docu20/tutorials/proxy/proxying.html but I've
not found about it
I've tried adding the next rule in mi apache httpd config:
RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
So, My file (more o less) is some like this:
<VirtualHost *:80>
ServerName www.myexample.com
CacheRoot /var/cache/apache2/mod_disk_cache
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
ProxyRequests Off
RewriteEngine On
RewriteLog "/var/cache/apache2/rewrite.log"
RewriteLogLevel 3
# my own files
RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
# live
RewriteRule ^/([^/\.]+)$ $1/ [R]
RewriteRule ^/(.*) http://www.myexample.com:8888/default/live/$1
[P,L]
ProxyPass / http://www.myexample.com:8888/default/live/
ProxyPassReverse / http://www.myexample.com:8888/default/live/
</VirtualHost>
But When I get the URL http://www.myexample.com/MyVideos/ It makes
tranformation but after pass this to lenya and no search it in
filesystem. And then get the lenya not found document message:
"El documento solicitado '/usr/local/lenya/MyVideos/test.flv' con
documento-id no existe."
Do you know how can I get this behaviour in my portal over a unique
domain, using apache httpd?
Many thanks in advance
--
María Jesús Turiel Martínez
Dpto. Desarrollo
Silice Tecnología y Servicios
Empresa Certificada ITMark
Telf. 902 888 264
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Rules to file system and Lenya
Posted by Andreas Hartmann <an...@apache.org>.
Maria Jesus Turiel schrieb:
> Perfect! It works.
Good to hear that :)
BTW, would you mind sending usage questions to the users list? TIA!
Have a nice day,
-- Andreas
>
> The file content, fyi, is then like this:
>
> <VirtualHost *:80>
>
> ServerName www.myexample.com
>
> CacheRoot /var/cache/apache2/mod_disk_cache
> CacheEnable disk /
> CacheDirLevels 5
> CacheDirLength 3
>
> ProxyRequests Off
> RewriteEngine On
>
> RewriteLog "/var/cache/apache2/rewrite.log"
> RewriteLogLevel 3
>
> # my own files
> RewriteRule ^/MyVideos/(.*) /usr/local/lenya/MyVideos/$1 [L]
>
> # live
> RewriteRule ^/([^/\.]+)$ $1/ [R]
> RewriteRule ^/(.*) http://www.myexample.com:8888/default/live/$1
> [P,L]
>
> ProxyPass /MyVideos/ !
> ProxyPass / http://www.myexample.com:8888/default/live/
> ProxyPassReverse / http://www.myexample.com:8888/default/live/
>
> </VirtualHost>
>
> Thank you very much Andreas
>
>
>
>
>
> El jue, 23-04-2009 a las 13:42 +0200, Andreas Hartmann escribió:
>> Hi Maria Jesus,
>>
>> Maria Jesus Turiel schrieb:
>>> Hi again :)
>>>
>>> I need that some url on my Portal get files on file system but no
>>> through lenya.
>>>
>>> I have read documents in
>>> http://lenya.apache.org/docu20/tutorials/proxy/proxying.html but I've
>>> not found about it
>>>
>>> I've tried adding the next rule in mi apache httpd config:
>>>
>>> RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
>>>
>>> So, My file (more o less) is some like this:
>>>
>>> <VirtualHost *:80>
>>>
>>> ServerName www.myexample.com
>>>
>>> CacheRoot /var/cache/apache2/mod_disk_cache
>>> CacheEnable disk /
>>> CacheDirLevels 5
>>> CacheDirLength 3
>>>
>>> ProxyRequests Off
>>> RewriteEngine On
>>>
>>> RewriteLog "/var/cache/apache2/rewrite.log"
>>> RewriteLogLevel 3
>>>
>>> # my own files
>>> RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
>> I guess you should add the [L] to this rule too to avoid further rewriting.
>>
>>> # live
>>> RewriteRule ^/([^/\.]+)$ $1/ [R]
>>> RewriteRule ^/(.*) http://www.myexample.com:8888/default/live/$1
>>> [P,L]
>>>
>>> ProxyPass / http://www.myexample.com:8888/default/live/
>>> ProxyPassReverse / http://www.myexample.com:8888/default/live/
>> I think you have to disable proxying for the videos URI:
>>
>> ProxyPass /MyVideos/ !
>>
>> Maybe this helps.
>>
>> -- Andreas
>>
>>
>>
>>> </VirtualHost>
>>>
>>> But When I get the URL http://www.myexample.com/MyVideos/ It makes
>>> tranformation but after pass this to lenya and no search it in
>>> filesystem. And then get the lenya not found document message:
>>>
>>> "El documento solicitado '/usr/local/lenya/MyVideos/test.flv' con
>>> documento-id no existe."
>>>
>>> Do you know how can I get this behaviour in my portal over a unique
>>> domain, using apache httpd?
>>>
>>> Many thanks in advance
>>>
>>>
>>
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Rules to file system and Lenya
Posted by Maria Jesus Turiel <ma...@silicetelecom.com>.
Hi,
Perfect! It works.
The file content, fyi, is then like this:
<VirtualHost *:80>
ServerName www.myexample.com
CacheRoot /var/cache/apache2/mod_disk_cache
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
ProxyRequests Off
RewriteEngine On
RewriteLog "/var/cache/apache2/rewrite.log"
RewriteLogLevel 3
# my own files
RewriteRule ^/MyVideos/(.*) /usr/local/lenya/MyVideos/$1 [L]
# live
RewriteRule ^/([^/\.]+)$ $1/ [R]
RewriteRule ^/(.*) http://www.myexample.com:8888/default/live/$1
[P,L]
ProxyPass /MyVideos/ !
ProxyPass / http://www.myexample.com:8888/default/live/
ProxyPassReverse / http://www.myexample.com:8888/default/live/
</VirtualHost>
Thank you very much Andreas
El jue, 23-04-2009 a las 13:42 +0200, Andreas Hartmann escribió:
> Hi Maria Jesus,
>
> Maria Jesus Turiel schrieb:
> > Hi again :)
> >
> > I need that some url on my Portal get files on file system but no
> > through lenya.
> >
> > I have read documents in
> > http://lenya.apache.org/docu20/tutorials/proxy/proxying.html but I've
> > not found about it
> >
> > I've tried adding the next rule in mi apache httpd config:
> >
> > RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
> >
> > So, My file (more o less) is some like this:
> >
> > <VirtualHost *:80>
> >
> > ServerName www.myexample.com
> >
> > CacheRoot /var/cache/apache2/mod_disk_cache
> > CacheEnable disk /
> > CacheDirLevels 5
> > CacheDirLength 3
> >
> > ProxyRequests Off
> > RewriteEngine On
> >
> > RewriteLog "/var/cache/apache2/rewrite.log"
> > RewriteLogLevel 3
> >
> > # my own files
> > RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
>
> I guess you should add the [L] to this rule too to avoid further rewriting.
>
> > # live
> > RewriteRule ^/([^/\.]+)$ $1/ [R]
> > RewriteRule ^/(.*) http://www.myexample.com:8888/default/live/$1
> > [P,L]
> >
> > ProxyPass / http://www.myexample.com:8888/default/live/
> > ProxyPassReverse / http://www.myexample.com:8888/default/live/
>
> I think you have to disable proxying for the videos URI:
>
> ProxyPass /MyVideos/ !
>
> Maybe this helps.
>
> -- Andreas
>
>
>
> > </VirtualHost>
> >
> > But When I get the URL http://www.myexample.com/MyVideos/ It makes
> > tranformation but after pass this to lenya and no search it in
> > filesystem. And then get the lenya not found document message:
> >
> > "El documento solicitado '/usr/local/lenya/MyVideos/test.flv' con
> > documento-id no existe."
> >
> > Do you know how can I get this behaviour in my portal over a unique
> > domain, using apache httpd?
> >
> > Many thanks in advance
> >
> >
>
>
--
María Jesús Turiel Martínez
Dpto. Desarrollo
Silice Tecnología y Servicios
Empresa Certificada ITMark
Telf. 902 888 264
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: Rules to file system and Lenya
Posted by Andreas Hartmann <an...@apache.org>.
Hi Maria Jesus,
Maria Jesus Turiel schrieb:
> Hi again :)
>
> I need that some url on my Portal get files on file system but no
> through lenya.
>
> I have read documents in
> http://lenya.apache.org/docu20/tutorials/proxy/proxying.html but I've
> not found about it
>
> I've tried adding the next rule in mi apache httpd config:
>
> RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
>
> So, My file (more o less) is some like this:
>
> <VirtualHost *:80>
>
> ServerName www.myexample.com
>
> CacheRoot /var/cache/apache2/mod_disk_cache
> CacheEnable disk /
> CacheDirLevels 5
> CacheDirLength 3
>
> ProxyRequests Off
> RewriteEngine On
>
> RewriteLog "/var/cache/apache2/rewrite.log"
> RewriteLogLevel 3
>
> # my own files
> RewriteRule ^/MyVideos/.*$ /usr/local/lenya/MyVideos/$1
I guess you should add the [L] to this rule too to avoid further rewriting.
> # live
> RewriteRule ^/([^/\.]+)$ $1/ [R]
> RewriteRule ^/(.*) http://www.myexample.com:8888/default/live/$1
> [P,L]
>
> ProxyPass / http://www.myexample.com:8888/default/live/
> ProxyPassReverse / http://www.myexample.com:8888/default/live/
I think you have to disable proxying for the videos URI:
ProxyPass /MyVideos/ !
Maybe this helps.
-- Andreas
> </VirtualHost>
>
> But When I get the URL http://www.myexample.com/MyVideos/ It makes
> tranformation but after pass this to lenya and no search it in
> filesystem. And then get the lenya not found document message:
>
> "El documento solicitado '/usr/local/lenya/MyVideos/test.flv' con
> documento-id no existe."
>
> Do you know how can I get this behaviour in my portal over a unique
> domain, using apache httpd?
>
> Many thanks in advance
>
>
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org