Re: [Catalyst] Serving html pages
On Sat, Jan 12, 2008 at 11:18:21AM +0800, Martin Ellison wrote: > 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? Get your own copy of apache and whack the rewrite debug level to 9; then you can figure it all out locally. mod_rewrite is baroque but it's not that hard to work out once you've got the debug info. -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Directorhttp://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Serving html pages
cannot be used with a .htaccess file. Neither can Alias. On 13/01/2008, Len Jaffe <[EMAIL PROTECTED]> wrote: > > > > On Jan 11, 2008 10:18 PM, Martin Ellison <[EMAIL PROTECTED]> wrote: > > > 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. > > > > [edit] > > > > 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... > > > > > > > > > # Aliases > > > Alias /static /var/www/vdc/root/static > > > Alias /other-static-files /var/vdc/whatever > > > > > > # The static content is served by apache directly > > > > > > SetHandler default-handler > > > > > > > > > SetHandler default-handler > > > > > > > > > Those are the important bits. > They tell apache where the files really live in the file system, > and to use the regular file serving mechanism on them. > > You're defining / to serve your cat app. So any subdirectories of /, like > /static have to be configured to be served by the default handler. > > Len. > > -- > [EMAIL PROTECTED] > 614-404-4214 > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ > > -- Regards, Martin ([EMAIL PROTECTED]) IT: http://methodsupport.com Personal: http://thereisnoend.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Serving html pages
On Jan 11, 2008 10:18 PM, Martin Ellison <[EMAIL PROTECTED]> wrote: > 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. > > [edit] > > 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... > > > > > > # Aliases > > Alias /static /var/www/vdc/root/static > > Alias /other-static-files /var/vdc/whatever > > > > # The static content is served by apache directly > > > > SetHandler default-handler > > > > > > SetHandler default-handler > > > > > Those are the important bits. They tell apache where the files really live in the file system, and to use the regular file serving mechanism on them. You're defining / to serve your cat app. So any subdirectories of /, like /static have to be configured to be served by the default handler. Len. -- [EMAIL PROTECTED] 614-404-4214 ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Serving html pages
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... > > > > [...] > > # 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 > > SetHandler modperl > PerlResponseHandler vdc > > > # The static content is served by apache directly > > SetHandler default-handler > > > SetHandler default-handler > > > # main app directory conf > > DefaultLanguage es > AddHandler cgi-script .pl > AllowOverride None > Options ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > > > # 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 > > > > > 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: Catalyst@lists.scsys.co.uk > > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > > Searchable archive: > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > > Dev site: http://dev.catalyst.perl.org/ > > > > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ > -- Regards, Martin ([EMAIL PROTECTED]) IT: http://methodsupport.com Personal: http://thereisnoend.org ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Serving html pages
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... [...] # 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 SetHandler modperl PerlResponseHandler vdc # The static content is served by apache directly SetHandler default-handler SetHandler default-handler # main app directory conf DefaultLanguage es AddHandler cgi-script .pl AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all # 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 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: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ > ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Serving html pages
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: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Serving html pages
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 -- - Emmanuel Quevillon Biological Software and Databases Group Institut Pasteur +33 1 44 38 95 98 tuco at_ pasteur dot fr - ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/