apache proxying / rewriting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

apache proxying / rewriting

Damien Pollet
Hi, I'd like to overlay seaside apps over the root of an apache vhost,
ie http://host/foo.html is served as is if it's an actual file in the
DocumentRoot, but http://host/pier gets reverse-proxied to a squeak
image.

Looking in previous threads, it looks like this should work:
ProxyPreserveHost On
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ http://localhost:8080/seaside/$1 [P,L]

But since seaside generates links with seaside, accessing
http://host/pier works but then all the links generated by seaside are
wrong.

NB with RewriteRule ^/(.*)$ http://localhost:8080/$1 [P,L] and
accessing http://host/seaside/pier, it *does* work. But I'm curious
because in some mails it seemed like the seaside prefix can be
eliminated… how ?

Thanks

--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: apache proxying / rewriting

Lukas Renggli
> But since seaside generates links with seaside, accessing
> http://host/pier works but then all the links generated by seaside are
> wrong.

You can change the path that Seaside generates in the configuration
interface of the application. Set the 'Server Base Path' to '/pier' in
your case and keep the rest as is.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: apache proxying / rewriting

Damien Pollet
On Thu, Oct 30, 2008 at 5:02 PM, Lukas Renggli <[hidden email]> wrote:
>> But since seaside generates links with seaside, accessing
>> http://host/pier works but then all the links generated by seaside are
>> wrong.
>
> You can change the path that Seaside generates in the configuration
> interface of the application. Set the 'Server Base Path' to '/pier' in
> your case and keep the rest as is.

Cool ! That only works partially though (*), but maybe this is my
image ? It's running Seaside2.8a1-pmm.573.mcz

It looks like the value is shared among applications but not all, and
like some apps don't take it into account…


--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: apache proxying / rewriting

Lukas Renggli
> It looks like the value is shared among applications but not all, and
> like some apps don't take it into account…

The value should not be shared. Normally you have to set it per application.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: apache proxying / rewriting

Damien Pollet
On Thu, Oct 30, 2008 at 6:15 PM, Lukas Renggli <[hidden email]> wrote:
>> It looks like the value is shared among applications but not all, and
>> like some apps don't take it into account…
>
> The value should not be shared. Normally you have to set it per application.

Forget about that, I'm not sure what gave me that impression…

I found http://lists.squeakfoundation.org/pipermail/seaside/2007-April/011724.html
and updated the RewriteRule accordingly, it works as expected.

However, in the Dispatcher Editor and Dispatcher Viewer, the links in
the first column of the list of applications still have the /seaside
prefix. But I guess that's normal because the Dispatchers show WAKom's
configuration as-is ?

--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: apache proxying / rewriting

Lukas Renggli
> However, in the Dispatcher Editor and Dispatcher Viewer, the links in
> the first column of the list of applications still have the /seaside
> prefix. But I guess that's normal because the Dispatchers show WAKom's
> configuration as-is ?

Yes, the dispatcher shows the path is looked up. This is (or can be)
something else than the path that is generated.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside