Mailing List Archive

EmbPerlObject setup for a virtual host
Hi,

I would like to use EmbPerlObjects. I'm using a virtual host, so I
can't change the general Apache config because that would mess up the
current "master plan" for all virtual hosts, says the server
administrator.

As an alternative to the <Location> directive in the Docs. He said
possibly: "You may be able to do something similar, using a
<FILESMatch> directive in
a .htaccess file.
http://www.apache.org/docs/mod/core.html#filesmatch

<FilesMatch "\.(epl|htm?)$">
PerlSetEnv EMBPERL_OBJECT_BASE base.htm
PerlSetEnv EMBPERL_FILESMATCH "\.htm.?|\.epl$"
SetHandler perl-script
PerlHandler HTML::EmbperlObject
Options ExecCGI
</FilesMatch>"

I don't know much about configuring .htaccess and don't want to mess it
up. Has anybody else solved this one?

Thanks,

Marcus Friedlaender
Re: EmbPerlObject setup for a virtual host [ In reply to ]
This is .htaccess that works perfectly well for me:

=====================================================
PerlSetEnv EMBPERL_OPTIONS 8208
PerlSetEnv EMBPERL_ESCMODE 0
PerlSetEnv EMBPERL_DEBUG 1
<FilesMatch ".*\.html$">
PerlSetEnv EMBPERL_FILESMATCH "\.html$"
PerlSetEnv EMBPERL_OBJECT_BASE base.html
SetHandler perl-script
PerlHandler HTML::EmbperlObject
Options ExecCGI
</FilesMatch>
=====================================================

I use HTML::Embperl with .htaccess quite often and works
fine - I just seem to recall I had problems when I used
both SetVar and PerlSetVar, so now I just use PerlSetVar
everywhere.

P.S. For performance reason you might want to put stuff into
<VirtualHost> section instead of .htaccess - it works the same way
but it's faster. If your admin will allow it.

- Robert

marcus wrote:
>
> Hi,
>
> I would like to use EmbPerlObjects. I'm using a virtual host, so I
> can't change the general Apache config because that would mess up the
> current "master plan" for all virtual hosts, says the server
> administrator.
>
> As an alternative to the <Location> directive in the Docs. He said
> possibly: "You may be able to do something similar, using a
> <FILESMatch> directive in
> a .htaccess file.
> http://www.apache.org/docs/mod/core.html#filesmatch
>
> <FilesMatch "\.(epl|htm?)$">
> PerlSetEnv EMBPERL_OBJECT_BASE base.htm
> PerlSetEnv EMBPERL_FILESMATCH "\.htm.?|\.epl$"
> SetHandler perl-script
> PerlHandler HTML::EmbperlObject
> Options ExecCGI
> </FilesMatch>"
>
> I don't know much about configuring .htaccess and don't want to mess it
> up. Has anybody else solved this one?
>
> Thanks,
>
> Marcus Friedlaender
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
Re: EmbPerlObject setup for a virtual host [ In reply to ]
On 14.6.2000 at 20:23 Robert wrote:
>This is .htaccess that works perfectly well for me:
><FilesMatch ".*\.html$">
> PerlSetEnv EMBPERL_FILESMATCH "\.html$"
> PerlSetEnv EMBPERL_OBJECT_BASE base.html

I'm a bit confused about using .html versus .epl extensions with
EmbPerl. Could somebody explain how and when you use which filetype for
what reason?

The server knows that .epl is an EmbPerl file and that works fine.

With the above .htaccess file am I declaring .html files below the
.htaccess file to be processed by EmbPerl?
In which case, I should make sure not to use plain html files, or they
would be processed uneccessarily by EmbPerl.

Thanks,

Marcus Friedlander
Re: EmbPerlObject setup for a virtual host [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 7:28 PM +0200 6/15/00, marcus wrote:
>With the above .htaccess file am I declaring .html files below the
>.htaccess file to be processed by EmbPerl?

Right.

>In which case, I should make sure not to use plain html files, or they
>would be processed uneccessarily by EmbPerl.

No harm caused, just a minor hit in speed. (Well, if you have any
syntax problems in them, embperl might complain.)

In general, use .epl and leave .html to normal serving if your site
is primarily raw html files. If on the other hand, the majority of
files use Embperl, then you might as well make your life easier and
let embperl process all the files automatically.
- --

Kee Hinckley - Somewhere Consulting Group - Cyberspace Architects(rm)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBOUkgVCZsPfdw+r2CEQIEQACfeoBVl8Chfqg6AkzsXIr1Oh5x9v8AnjJ4
rZoREW1QIQG+zRnI3y5Br2ff
=fxiA
-----END PGP SIGNATURE-----
RE: EmbPerlObject setup for a virtual host [ In reply to ]
> I'm a bit confused about using .html versus .epl extensions with
> EmbPerl. Could somebody explain how and when you use which filetype for
> what reason?
>

You could use whatever fileextention you like. Embperl doesn't care.

> The server knows that .epl is an EmbPerl file and that works fine.
>

You could tell the server the fileextention(s) which should be used by
Embperl

> With the above .htaccess file am I declaring .html files below the
> .htaccess file to be processed by EmbPerl?

Yes, .html file are processed by EmbperlObject and, if you have declared it
elsewhere, .epl file are processed by normal Embperl. Maybe you should
change .html to .epl?

> In which case, I should make sure not to use plain html files, or they
> would be processed uneccessarily by EmbPerl.
>

yes

Gerald

-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------