I have a similar problem, but I am on shared hosting and I do not have
access to httpd.conf, only to the local .htaccess files. I have the static
plugin set up so we are delivering HTML, image files and other static pages
via Catalyst, but similarly to Alejandro I would like to serve up the pages
directly from Apache.
I have tried using mod_rewrite but it seems to be an invention of the
Adversary designed to lead us into despair. Has anyone managed to serve
static files directly using just .htaccess?
On 12/01/2008, Alejandro Imass <[EMAIL PROTECTED]> wrote:
>
> Usually you would try to serve your static content directly with your
> Web Server and let only the dynamic part with Catalyst. For example
> you could have a configuration in your apache vhost as such:
>
> Suppose your app's name is vdc...
>
> <VirtualHost *>
>
> [...]
>
> # root of your app
> DocumentRoot /var/www/vdc/root
>
> # Aliases
> Alias /static /var/www/vdc/root/static
> Alias /other-static-files /var/vdc/whatever
> Alias / /var/www/vdc/script/vdc_cgi.pl
>
> # The Catalyst part is via mod_perl
> <Location />
> SetHandler modperl
> PerlResponseHandler vdc
> </Location>
>
> # The static content is served by apache directly
> <Location /static>
> SetHandler default-handler
> </Location>
> <Location /other-static-files>
> SetHandler default-handler
> </Location>
>
> # main app directory conf
> <Directory /var/www/vdc>
> DefaultLanguage es
> AddHandler cgi-script .pl
> AllowOverride None
> Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> </Directory>
>
> # personal error file
> ErrorLog /var/log/apache2/vdc-error.log
>
> # personal log file
> LogLevel warn
> CustomLog /var/log/apache2/vdc-access.log combined
> ServerSignature On
>
>
> </VirtualHost>
>
> On Jan 11, 2008 10:27 AM, Marcello Romani <[EMAIL PROTECTED]> wrote:
> > Emmanuel Quevillon ha scritto:
> > > Hi,
> > >
> > > I am quite new with catalyst and I'd like to know how I could serve
> some
> > > html pages (actually documentation) e.g.:
> > > www.myapp.com/docs/index.html ?
> > >
> > > When I try to integrate such link in my template page, Pages are not
> > > served and as mentioned in the C::P::Static::Simple it does not serve
> > > .html file.
> > >
> > > Is there any magic thing to do without changing
> > > MyApp->config->{static}->{ignore_extensions} ?
> > >
> > > Thanks a lot
> > >
> > > Regards
> > >
> >
> > If I recall correctly, the default is to serve as static files only the
> > ones under root/static, so try to put doc/ there.
> >
> > P.S.: Please don't start a new thread under an existing one.
> >
> > HTH
> >
> > --
> > Marcello Romani
> > Responsabile IT
> > Ottotecnica s.r.l.
> > http://www.ottotecnica.com
> >
> >
> > _______________________________________________
> > List: [email protected]
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive:
> http://www.mail-archive.com/[email protected]/
> > Dev site: http://dev.catalyst.perl.org/
> >
>
> _______________________________________________
> List: [email protected]
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
--
Regards,
Martin
([EMAIL PROTECTED])
IT: http://methodsupport.com Personal: http://thereisnoend.org
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/