[Seaside] Apache and virtual host

Rajeev Lochan lochan94 at gmail.com
Sat Feb 23 11:20:21 UTC 2008


Hi,
I had similar problem. I had not succeeded in Serving Static files. I
followed some instructions on this blog
http://open-sourcerer.blogspot.com/

you need to replicate your FileLibrary (s) into hard-disk of Server by
creating /seaside/files/SULibrary/
/seaside/files/WAStandardFilesLibrary   etc in your DocumentRoot
(/var/www/example)

When static files/logos/icons/CSS/Js are uploaded to Linux Server from a
Windows system, the folders and files do not have a Read-permission for
Browsers to serve them. If you change them, I guess your problem would be
solved.

Safari browser is also helpful in testing. Check out Activity Window in it,
it shows up all the files that have been loaded and you can see 403 error,
if a file is not found on disk.


HTH,
Rajeev

On Sat, Feb 23, 2008 at 2:44 PM, Norbert Hartl <norbert at hartl.name> wrote:

>
> On Thu, 2008-02-21 at 10:23 +0100, Marco D'Ambros wrote:
> > On Feb 21, 2008, at 1:30 AM, Ramon Leon wrote:
> >
> > >> Hi all!
> > >>
> > >> The question is: how do I do the same with seaside?
> > >> If I use the rewrite module of apache, with this configuration:
> > >>
> > >> <VirtualHost *:80>
> > >> ServerName www.example.org
> > >> RewriteEngine On
> > >> RewriteRule ^/(.*)$
> > >> http://localhost:8008/seaside/go/example/$1 [P,L] </VirtualHost>
> > >>
> > >> I will be redirected to the correct seaside web site, but in
> > >> the browser I will see the url machine.my.org:8008/seaside/go/
> > >> example/
> > >>
> > >> Many thanks and cheers
> > >> Marco D'Ambros
> > >
> > > Here's a working config, should be easily adaptable.
> > >
> > > <VirtualHost *:80>
> > >    ServerName linuxweb1
> > >    DocumentRoot /var/www
> > >    RewriteEngine On
> > >    ProxyRequests Off
> > >    ProxyPreserveHost On
> > >    UseCanonicalName Off
> > >
> > >    # http compression
> > >    DeflateCompressionLevel 5
> > >    SetOutputFilter DEFLATE
> > >    AddOutputFilterByType DEFLATE text/html text/plain text/xml
> > > application/xml application/xhtml+xml text/javascript text/css
> > >    BrowserMatch ^Mozilla/4 gzip-only-text/html
> > >    BrowserMatch ^Mozilla/4.0[678] no-gzip
> > >    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
> > >
> > >    #proxy to seaside if file not found
> > >    RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
> > >    RewriteRule ^/(.*)$ http://localhost:8080/$1 [P,L]
> > > </VirtualHost>
> > >
> > > Ramon Leon
> > > http://onsmalltalk.com
> >
> >
> > Thank you very much for your answer. Unfortunately I get a 403
> > (Forbidden error) on the browser, and this is the apache log line:
> >
> > client denied by server configuration: proxy:
> http://localhost:8018/seaside/go/Churrasco/favicon.ico
> > , referer: http://churrasco.inf.unisi.ch/
> >
> > Any idea?
> >
> It seems that your page might have been loaded ok. But browsers always
> try to request an icon for the browser to display beside the link.
> Unfortunately if you have a page with five elements and one results in
> a 403 the page might display the 403. That is sad because it appears
> on the favicon.ico which you don't really need.
> Does your configuration differ from ramons? If you have changed the
> RewriteRule line to
>
> RewriteRule ^/(.*)$ http://localhost:8018/seaside/go/Churrasco/$1 [P,L]
>
> then it is clear. The browse requests
>
> http://churrasco.inf.unisi.ch/favicon.ico
>
> But there is no file on the disk so apache redirects it to your
> application. I guess further you have WAAuthConfiguration added to
> your application. That would be the reason for the 403. Even if
> you've got a session already which is authenticated the request
> for the favicon.ico wouldn't contain the session parameters so
> it will be asked for authentication again. An easy fix would be
> to create a file favicon.ico at the document root of your apache.
>
> hope this helps,
>
> Norbert
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



-- 
Rajeev Lochan

Co-founder, AR-CAD.com

http://www.ar-cad.com
+91 9243468076 (Bangalore)
080 65355873
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080223/0566ad4f/attachment-0001.htm


More information about the seaside mailing list