Re: templating system opinions
I wanted to add that you *can* use Mason for MVC type programming. I do that on my current big project, www.better-investing.org, in the admin areas. I have a controller index.html page which chooses what component to run based on a run mode, just like CGI::Application, but then gives me all of the other stuff like autohandlers for the display. I'm using Template Toolkit and Apache Handlers (which work like CGI::Application) for another project. I'm not sure which I like better at the moment. I'm much faster in Mason still. -- Barry Hoggard Tristan Media LLC e: [EMAIL PROTECTED] w: www.tristanmedia.com aim: hoggardb
Re: templating system opinions
Jesse Erlbaum wrote: The big players are Template::Toolkit and HTML::Template. It's no secret that I'm a fan of HTML::Template -- Sam and I worked together when he wrote it, and my module, CGI::Application, uses it out of the box (although it does support TT). I use HTML::Template because designers can't be trusted to set variables. Boolean logic is about all their simple minds can handle. Anything which doesn't look like HTML is likely to cause them to have a stroke. Yes, I'm a programmer-snob and a fascist, and I like to take sharp objects away from the gentle creative types. Aside from the fact that HTML::Template uses less RAM and is faster than TT, this is the foremost reason I continue to use it. I used to use HTML::Template for projects, but I moved to Template::Toolkit because I felt the former's syntax was just too limited. I know we want to separate code and logic, but H::T keeps me from even referencing the attribute of an object. You can't say TMPL_VAR NAME=user.name and pass in a user object with the attribute (method) or even a hash key called name. You have to either treating it like a loop with one item (because loops use arrayrefs of hashrefs) or flatten it into variable names in your code. In a good OO system with objects representing the data model, I found it exhausting to use H::T when I could just to this in TT: [% user.name %] Am I just being stupid, or are there better ways of doing these things in H::T? -- Barry Hoggard Tristan Media LLC e: [EMAIL PROTECTED] w: www.tristanmedia.com aim: hoggardb
Re: [OT] Better Linux server platform: Redhat or SuSe?
Since everyone's become distracted by the lines of code number, I answered a few of the questions that I feel I can answer. Apache/modperl installation and updates: I assume installation is straight forward, how about keeping current? As those are remotely administered platforms, chances are the OS may not be kept current. So is it still easy to deal with security updates (Apache, sshd, bind etc) when the platform is a couple of years old? With FreeBSD this has become somewhat harder lately (still running 3.x, but the ports system doesn't support 3.x any longer). You're talking about using their packages? I suspect most people on this list build their own apache/mod_perl binaries. Remote maintability: Is it possible to remotely upgrade between OS versions for either of those platforms (not a must, but would be a plus)? I would be afraid to do that remotely, since it normally involved a kernel change as well. Sendmail: Does the system make it easy to replace sendmail with another mailer of choice (qmail in my case)? I don't know about Red Hat, but it's certainly easy in SuSE. Footprint: Is it easy to weed out unused system components to have a smaller footprint of the OS? Or does that mean fighting the installer left and right? I don't know if Red Hat is getting any better, but I've always found it difficult to do a minimal install. SuSE has options for a very minimal install which is what I use for server installs. perl: Any iussues with perl/modperl? Besides modperl I will be running a perl application with a few hundred thousend lines of code... My current project: http://www.better-investing.org runs on Red Hat. I'm not aware of any perl/mod_perl issues, but I built perl and the apache binaries myself. I don't use their RPMs. Security: Is it easy to 'tie down' the system? The web site is behind a firewall and load balancers, so the web servers themselves don't have ipchains, etc. but they also aren't running any services available to the outside except http and ssh. Software-based RAID 1: Is it usable (only for a data partition, not required for the root partition)? Is it easy to recover from a broken disk? Robustness: While almost all systems I have are/will be on UPSs, they still tend to occasionally be 'unplugged' (not shut down cleanly), be it due to an empty or dead UPS battery, someone tripping over or accidentaly unplugging the power cable etc. etc. Does the system tend to survive the then due fsck without manual intervention? Better yet, would it be possible to mount / and /usr read-only, and have a /var partition that (if the worst should happen) can be recreated on the fly? Can't help you on RAID, but I have found SuSE with ext3 or ReiserFS to be VERY recoverable. -- Barry Hoggard Tristan Media LLC e: [EMAIL PROTECTED] p: 212-627-1596 aim: hoggardb
Re: separating C from V in MVC
I forgot to ask one thing about Jesse's comments. I don't think the standard HTML::Template has support for formatting numbers, dates, etc. How do you make sure that it's done consistently in your applications? It seems problematic to me to require the programmers to do work when a designer wants to change the number of decimals in a page, for example. -- Barry Hoggard Tristan Media LLC e: [EMAIL PROTECTED] p: 212-627-1596 aim: hoggardb
Re: separating C from V in MVC
Jesse Erlbaum wrote: As you have already identified, the Model is simply a Perl module. The most important thing to think of when writing a Model module is to make sure you make it entirely separate from the user interface. It helps me to think of the methods in the Model as potentially being called from a web application, a cron script, or an email-based interface. The Model should not contain anything specific about any of the interfaces through which it might be accessed. Hi, Jesse. I think this part is probably an evolution from the earlier days of CGI::Application, at least in the applications your company wrote for my former, now defunct, employer. :) There was a tendency to make the CGI::Application-derived modules both M and V. I'm glad to see that's less the case these days. My current approach is to use Mason for implementing the controller and view, with a lot of the business logic put in the model. I'm probably going to explore using CGI::Application and either HTML::Template or Template Toolkit for a current side project. Do you have a favorite approach for writing the Model objects? At Investorama we created a class called TableObject that would deal with getting/setting values from the database, plus doing data verification like checking for values being present and well-formed XML in fields that needed it. I still use that approach on my consulting projects. It's not a very complex object, and it doesn't do things recursively, like mapping an attribute to an object and handling that object as well. TableObject doesn't act as a base class. It just becomes one of the attributes of the object. A typical invocation is something like this: my %fields = ( id = { type = 'num', pkey = 1, sequence = 'seq_users' }, email = { type = 'string', required = 1 }, password = { type = 'string', required = 1 }, first_name = { type = 'string', required = 1 }, last_name = { type = 'string', required = 1 }, valid = { type = 'num', required = 1}, member_id = { type = 'num' }, ); my $table = NAIC::TableObject-new(DBH = $self-dbh, OBJECT = $self, TABLE = 'users', FIELDS = \%fields, VERIFY = 1); $table is then put into $self as an attribute called '_table'. Storing/retrieving/verifying are done with $self-_table-store etc. It expects that the attributes of an object like $self-email match the database columns. -- Barry Hoggard Tristan Media LLC e: [EMAIL PROTECTED] p: 212-627-1596 aim: hoggardb
hub.org virtual machine for mod_perl?
Does anyone of the list have experience with using hub.org's virtual machine setup for a mod_perl site? I'm doing a proof of concept site for a new business that needs to be hosted somewhere other than my machine at home for people to bang on, and I don't want to pay for a dedicated server before I'm sure that we're ready. I'm an OO perl person, so just running things as a CGI gets pretty slow as the traffic increases. -- Barry Hoggard Tristan Media LLC e: [EMAIL PROTECTED] p: 212-627-1596 aim: hoggardb
Re: [OT] Inspired by closing comments from the UBB thread.
I think a lot of people's approach, including mine, is to have OO Perl modules for all database access. In my code (I use Mason), a web page only gets its data through calls like this: my $obj = NAIC::User-(DBH=$dbh, EMAIL='[EMAIL PROTECTED]'); $obj-load; my $groups_list = $obj-groups(); That way any needed SQL changes, or even ports to a new database, don't have to be done everywhere in my code. On Wed, Aug 01, 2001 at 10:12:45AM -0500, Joe Breeden wrote: All, In his closing comments about UBB Kyle Dawkins made a statement that got me wondering. He said there's SQL embedded all throughout the Perl everywhere (who does this?! oh my god, are they on crack?). ... It would be interesting to know how other people have solved that problem. Currently, we are essentially using embedded SQL in our apps. -- Barry Hoggard
Re: deploying tips running 2 apache server
I'm using 2 servers - static on front end + mod_perl/mason on the back. Here are my rewrite rules (the reason you see dollar signs with $user/$port/$perlport are because I'm using mod_macro): # proxy everything that's not static or images to mod_perl Options -Indexes RewriteEngine On #RewriteLog /tmp/rewrite.log-$user RewriteLogLevel 0 RewriteRule ^/static/ - [L] RewriteRule ^/images/ - [L] # deal with trailing slash problem RewriteCond/home/httpd/$user/comp_root/htdocs%{REQUEST_FILENAME} -d RewriteRule^(.+[^/])$ $1/ [R] RewriteRule ^/(.*) http://%{SERVER_NAME}:$perlport/$1 [P] ProxyPassReverse/ http://%{SERVER_NAME}/ --- rene mendoza [EMAIL PROTECTED] wrote: i ve been reading the mod perl guide and ive learned that i dont want to use apache child processes to serve static html or images, so i want to implement a lightweight (only mod_dav and cgi enabled apache server, lots of child processes) and a heavy mod perl apache server 5 or 10 apache processes/ does anybody has pointers, or tips of where to start? how to configure that only static content of a virtual host goes thru one server and dynamic goes thru another. im using Mason in the mod_perl enabled apache is it done with mod_rewrite?, should both servers be ssl enabled? thanks rene mendoza = Barry Hoggard http://www.hoggard.org __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Passing data among handlers
We created our own "request" object that gets passed to components that might need it. We were concerned about pnotes becoming a big, hard-to-debug global area. ===== Barry Hoggard http://www.hoggard.org __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Re: Passing data among handlers
I'm not sure what we're doing is very applicable. Ours is meant to be used in HTML::Mason, so that the object is passed as an argument to any mason components that need it. I wanted to have a definitive list of methods, rather that let people just stick things into pnotes whenever they felt like it. So we're not really using pnotes at all. --- Drew Taylor [EMAIL PROTECTED] wrote: I have a slightly different twist on this question. We run Registry scripts on our site for debugging purposes. I would love to have a module for saving variables/data structures on a per-request basis (like the current Apache notes), but internally using pnotes under mod_perl, and some other mechanism (package vars like I'm using now?) under everything else. The purpose of this being so that I could have a nice interface for per-request data that I could pass between different (non-OO) modules. This sounds vaguely familiar to what you did Barry. Can you elaborate a little? = Barry Hoggard http://www.hoggard.org __ Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
Problem with %Location in Perl Config
I'm working on an apache configuration script, and I'm having trouble with the enabling of perl-status, server-info, etc. I modified the examples in the eg directory, so I have: my %handlers = ( "/perl-status" = "Apache::Status", ); for (keys %handlers) { $Location{$_} = { PerlHandler = $handlers{$_}, SetHandler = "perl-script", Options = "ExecCGI", }; } for (qw(status info)) { $Location{"/server-$_"} = { SetHandler = "server-$_", }; } print STDERR Apache::PerlSections-dump(); --- the dump gives me: ... #hashes: %Location = ( '/perl-status' = { 'PerlHandler' = 'Apache::Status', 'SetHandler' = 'perl-script', 'Options' = 'ExecCGI' }, '/server-status' = { 'SetHandler' = 'server-status' }, '/server-info' = { 'SetHandler' = 'server-info' } ); - I still get 404 errors. Any suggestions? -- Barry Hoggard Chief Technology Officer http://www.investorama.com v: 212.905.1639 x194 e: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with %Location in Perl Config
To reply to my own messages... These work fine in the httpd.conf with a Perl section, but I was trying to do it in a separate startup script. I'm just going to move my code back to the main conf file for now. -- Barry Hoggard Chief Technology Officer http://www.investorama.com v: 212.905.1639 x194 e: [EMAIL PROTECTED] - Original Message - From: "Barry Hoggard" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 17, 2000 5:35 PM Subject: Problem with %Location in Perl Config | I'm working on an apache configuration script, and I'm having trouble with | the enabling of perl-status, server-info, etc. | | I modified the examples in the eg directory, so I have: | | my %handlers = ( |"/perl-status" = "Apache::Status", | ); | | for (keys %handlers) { | $Location{$_} = { | PerlHandler = $handlers{$_}, | SetHandler = "perl-script", | Options = "ExecCGI", | }; | } | | | for (qw(status info)) { | $Location{"/server-$_"} = { | SetHandler = "server-$_", | }; | } | | print STDERR Apache::PerlSections-dump(); | | --- | the dump gives me: | | ... | | #hashes: | | %Location = ( | '/perl-status' = { | 'PerlHandler' = 'Apache::Status', | 'SetHandler' = 'perl-script', | 'Options' = 'ExecCGI' | }, | '/server-status' = { | 'SetHandler' = 'server-status' | }, | '/server-info' = { | 'SetHandler' = 'server-info' | } | ); | | | - | | I still get 404 errors. Any suggestions? | | | | -- | Barry Hoggard | Chief Technology Officer | http://www.investorama.com | v: 212.905.1639 x194 | e: [EMAIL PROTECTED] | | | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AxKit / Apache::Filter - simple test case fails
OK - here is a simpler case of just a "hello world" type module as the first stage in filtering, with AxKit at the end. I'm getting "Bad filter_input status" from AxKit. Am I supposed to being something different wth my module? Apache::Filter is 1.011 My first module in the filter chain - prints an XML doc to STDOUT package Barry::Hello; use Apache::Constants qw(:common); use Carp; use strict; sub handler { my $r = shift; my $filter = $r-dir_config('Filter'); carp "filter status is $filter"; if ($filter) { my ($fh, $status) = $r-filter_input(); return $status unless $status == OK; } $r-content_type('/text/xml'); print(q{?xml version="1.0"? ?xml-stylesheet href="/xsl/camel.xsl" type="text/xsl"? dromedaries species name="Camel" humps1 or 2/humps dispositionCranky/disposition /species species name="Llama" humps1 (sort of)/humps dispositionAloof/disposition /species species name="Alpaca" humps(see Llama)/humps dispositionFriendly/disposition /species /dromedaries }); return OK; } 1; -- My httpd.conf: # AxKit Configuration PerlModule AxKit AxProvider Apache::AxKit::Provider::Filter AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot AxCacheDir /home/httpd/axkit_cache AxDebugLevel 10 PerlModule Apache::Filter PerlModule Barry::Hello # turn on filtering PerlSetVar Filter On SetHandler perl-script PerlHandler Barry::Hello AxKit -- Here's the log messages: filter status is On at /dev/null line 0 ***info for /home/httpd/comp_root/docs is at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 33. [AxKit] : (Re)loading Apache/AxKit/Provider/Filter.pm ***info for /home/httpd/comp_root/docs is count 1 is_dir 1 fh_in GLOB(0x9ebfc44) at /usr/lib/perl5/site_perl/5.005/Apache/Filter .pm line 33. [Thu Oct 12 17:39:32 2000] [error] [client 172.19.1.51] [AxKit] [Error] Bad filter_input status [Thu Oct 12 17:39:32 2000] [error] [client 172.19.1.51] [AxKit] From: /usr/lib/perl5/site_perl/5.005/i586-linux/Apache/AxKit/Provide r/Filter.pm : 39 [Thu Oct 12 17:39:32 2000] [error] [client 172.19.1.51] [AxKit] [Backtrace] Bad filter_input status at /usr/lib/perl5/site_perl/5.00 5/i586-linux/Apache/AxKit/Provider/Filter.pm line 39 Apache::AxKit::Provider::Filter::init('Apache::AxKit::Provider::Filter=HASH( 0xa3ccc00)') called at /usr/lib/perl5/site_perl/ 5.005/i586-linux/Apache/AxKit/Provider.pm line 19 Apache::AxKit::Provider::new('Apache::AxKit::Provider', 'Apache=SCALAR(0xa0a1c68)') called at /usr/lib/perl5/site_perl/5.005 /i586-linux/AxKit.pm line 435 AxKit::handler('Apache=SCALAR(0xa0a1c68)') called at /dev/null line 0 eval {...} called at /dev/null line 0 -- Barry Hoggard Chief Technology Officer http://www.investorama.com v: 212.905.1639 x194 e: [EMAIL PROTECTED]
HTML::Mason/ AxKit / Apache::Filter
Does anyone have this combination working? I'm using Mason 0.89, Filter 1.011. I'm getting my files twice, and headers twice. I have asked on the Mason and AxKit mailing lists, but we haven't been able to figure it out. Here's the info from my other postings: I'm trying to debug using HTML::Mason as the provider (using Apache::Filter) for AxKit's XML step. I'm forwarding mine and Matt's discussion so far to see if anyone here has figured this out. Apache::Filter is 1.011 HTML::Mason is 0.89. Additionally, here's my error log if I turn on debug=1 in Apache::Filter (the http request for test.xsl is because I'm using IE to request the page and it's attempting its own XSLT transformation): [AxKit] : (Re)loading Apache/AxKit/Provider/Filter.pm ***info for /home/httpd/comp_root/docs/test.xml is at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 33. /home/httpd/comp_root/docs/test.xml: This is the first filter at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 66. Untie()ing STDOUT at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 76. Tie()ing STDOUT to Apache::Filter at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 90. END info is old_stdout Apache count 1 fh_in GLOB(0x8e56390) at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 94. [AxKit] : handler called for /test.xml [AxKit] : checking if we process this resource [AxKit] : media: screen, preferred style: #default [AxKit] : getting styles and external entities from the XML [AxKit] : styles and external entities not cached - calling get_styles() [AxKit] : get_styles: creating XML::Parser [AxKit] : get_styles: calling XML::Parser-parse('/home/httpd/comp_root/docs/test.xml') [AxKit] : parse_pi: href = test.xsl [AxKit] : parse_pi: type = text/xsl [AxKit] : get_styles: parse returned: OK [AxKit] : get_styles: parse returned successfully [AxKit] : get_styles: loading style modules [AxKit] : get_styles: looking for mapping for style type: 'text/xsl' [AxKit] : (Re)loading Apache/AxKit/Language/Sablot.pm [AxKit] : resetting cache with no preferred style [AxKit] : some condition failed. recreating output [AxKit] : File Provider set filename to /home/httpd/comp_root/docs/test.xsl [AxKit] : about to execute: Apache::AxKit::Language::Sablot::handler [AxKit] : execution of: Apache::AxKit::Language::Sablot::handler finished [AxKit] : writing xml string to browser [AxKit] : (Re)loading Apache/AxKit/Provider/Filter.pm ***info for /home/httpd/comp_root/docs/test.xsl is at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 33. /home/httpd/comp_root/docs/test.xsl: This is the first filter at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 66. Untie()ing STDOUT at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 76. Tie()ing STDOUT to Apache::Filter at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 90. END info is old_stdout Apache count 1 fh_in GLOB(0x8e5f420) at /usr/lib/perl5/site_perl/5.005/Apache/Filter.pm line 94. [AxKit] : handler called for /test.xsl [AxKit] : checking if we process this resource [AxKit] : media: screen, preferred style: #default [AxKit] : getting styles and external entities from the XML [AxKit] : styles and external entities not cached - calling get_styles() [AxKit] : get_styles: creating XML::Parser [AxKit] : get_styles: calling XML::Parser-parse('/home/httpd/comp_root/docs/test.xsl') [AxKit] : get_styles: parse returned: OK [AxKit] : get_styles: parse returned successfully [Wed Oct 4 12:28:23 2000] [error] [client 172.19.0.106] [AxKit] [Error] No styles defined for '/home/httpd/comp_root/docs/test.xsl' [Wed Oct 4 12:28:23 2000] [error] [client 172.19.0.106] [AxKit] From: /usr/lib/perl5/site_perl/5.005/i586-linux/Apache/AxKit/Provider.pm : 135 [Wed Oct 4 12:28:23 2000] [error] [client 172.19.0.106] [AxKit] [Backtrace] No styles defined for '/home/httpd/comp_root/docs/test.xsl' at /usr/lib/perl5/site_perl/5.005/i586-linux/Apache/AxKit/Provider.pm line 135 Apache::AxKit::Provider::get_styles('Apache::AxKit::Provider::Filter=HASH(0x 8e5f348)', 'screen', '#default') called at /usr/lib/perl5/site_perl/5.005/i586-linux/AxKit.pm line 710 AxKit::get_styles_and_ext_ents('screen', '#default', 'Apache::AxKit::Cache=HASH(0x8e63eec)', 'Apache::AxKit::Provider::Filter=HASH(0x8e5f348)') called at /usr/lib/perl5/site_perl/5.005/i586-linux/AxKit.pm line 460 AxKit::handler('Apache=SCALAR(0x8b94b4c)') called at /dev/null line 0 eval {...} called at /dev/null line 0 -- Barry Hoggard Chief Technology Officer http://www.investorama.com v: 212.905.1639 x194 e: [EMAIL PROTECTED]
Re: Templating System
Thanks for the information below, Ian. Our site is very content-oriented, and a lot of our business projects are starting to involve things like co-branding and licensing content, so I'm very interested to hear more about how you are integrating XSLT and Mason. Do you generate XML documents in mason and then transform them via XSLT? Are individual components responsible for their own transformations, or do you do it all at the end with the whole page? I agree that HTML::Mason is awesome, and the fact that it parses components into anonymous perl subs gives it great performance. The other aspect that's so great is its cacheing system, which can be so easily controlled programmatically. At 07:26 AM 7/27/00 -0700, Ian Kallen wrote: I'm not going to disparage any of the other templating systems but since noone has chimed in for HTML::Mason, I guess I'll have to. Important aspects of such a beast is componentization, not just "mail merge" behaviors. Mason components can be just HTML (or XML or fooML) or just Perl or both. The "heavy lifting" can be moved to the bottom of a page so you can get away from top to bottom processing whih generall demands expressing complex code in the middle of HTML. Caching by distilling components down into Perl code. In many other respects, the API, the execution and the object models are the most empowering. My current focus is on using Mason as a component system but XSLT when I need ad-hoc transformation a la AxKit, Cocoon and other XSLT processor-based systems. Mixing AxKit and Mason may sound crazy but each has compelling ideas in their architecture. -- Barry Hoggard VP of Software Development e: [EMAIL PROTECTED] w: http://www.investorama.com
Re: Re: redirecting a domain
No! That's a silly way to do it. You want to use mod_rewrite. Here's the relevant part of my httpd.conf: RewriteEngine On RewriteCond %{HTTP_HOST} !^www.investorama.com$ RewriteCond %{HTTP_HOST} !^$ RewriteRule /?(.*) http://www.investorama.com/$1 [R=permanent,L] Any requests that manage to make it to the IP address for www.investorama.com that don't point to it are redirected. You should look at the pages for mod_rewrite at: http://www.engelschall.com/pw/apache/rewriteguide/ Begin Original Message From: Michael Robinton [EMAIL PROTECTED] Sent: Sun, 16 Jul 2000 14:32:41 -0700 (PDT) To: Sam Carleton [EMAIL PROTECTED] CC: php [EMAIL PROTECTED], mod_perl [EMAIL PROTECTED] Subject: Re: redirecting a domain Sure, load the page in a frame that hides the second url request On Fri, 14 Jul 2000, Sam Carleton wrote: I have an apache question and I have NO idea where to post it. Is there a newsgroup or mailing list simply for apache? I have multipal domain names: domain.net domain.org. I would like to configure apache such that when someone goes to www.domain.org, they are "redirect" to www.domain.net. They are both the exact same web site, I simply want the domain name to show up as www.domain.net. Any thoughs on how to do that? Sam End Original Message Barry Hoggard VP of Software Development http://www.investorama.com email: [EMAIL PROTECTED] voice: 212-741-7954 Investorama.com -- Your Portal to Financial Freedom
Re: Re: Re: redirecting a domain [OT]
Nothing is wrong with that solution if you only have a few domains. We own a lot of misspellings of our company name, so I don't want to add each of them individually to the conf file. Begin Original Message From: Todd Finney [EMAIL PROTECTED] Sent: Sun, 16 Jul 2000 22:33:18 -0400 To: mod_perl [EMAIL PROTECTED] Subject: Re: Re: redirecting a domain [OT] At 10:23 PM 7/16/00, Barry Hoggard wrote: No! That's a silly way to do it. You want to use mod_rewrite. Here's the relevant part of my httpd.conf: RewriteEngine On RewriteCond %{HTTP_HOST} !^www.investorama.com$ RewriteCond %{HTTP_HOST} !^$ RewriteRule /?(.*) http://www.investorama.com/$1 [R=permanent,L] Too complicated. What's wrong with this: VirtualHost ip.of.domain.org ServerName www.domain.org Redirect permanent / http://www.domain.net/ /VirtualHost Todd End Original Message Barry Hoggard VP of Software Development http://www.investorama.com email: [EMAIL PROTECTED] voice: 212-741-7954 Investorama.com -- Your Portal to Financial Freedom
Re: Problem running LWP under modperl (LONG)
The line where it dies is here (warnings added by me) in LWP::Protocol::http. I never get the second warning under Registry. warn "CREATING SELECT with $socket"; my $sel = IO::Select-new($socket) if $timeout; warn "SELECT CREATED"; hmm, any difference if you add 'PerlModule IO::Select' to httpd.conf? No difference. I see IO::Select in my perl-status modules list. Could it be a problem of shared .so perl? Is that what you're using, or the libperl.a version? -- Barry Hoggard http://www.investorama.com voice: 212-741-7954 email: [EMAIL PROTECTED]