[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Can't create virtualhosts using %VirtualHost
From: Greg Wickham <G.Wickham () deakin ! edu ! au>
Date: 1999-02-28 3:56:43
[Download RAW message or body]
Hi All,
(This is with apache_1.3.4/mod_perl-1.18/mod_ssl-2.2.3-1.3.4)
I'm desperately trying to create virtual hosts using
the %VirtualHost hash, however it always fails:
the <Perl></Perl> portion of my httpd.conf:
] <Perl>
] #!/usr/bin/perl
] # use strict;
] use Apache ();
] use Apache::Registry ();
] use Apache::RegistryNG ();
]
] $VirtualHost{"mydomain.com"} = (
] DocumentRoot => "/mydomain.com/htdocs",
] ErrorLog => "/dev/null"
] );
]
] __END__
] </Perl>
] # ./sbin/httpd
] perl_parse args: '-T' '-w' '/dev/null' ...allocating perl interpreter...ok
] constructing perl interpreter...ok
] ok
] running perl interpreter...ok
] mod_perl: 0 END blocks encountered during server startup
] loading perl module 'Apache'...ok
] loading perl module 'Apache::DBI'...fetching PerlChildInitHandler stack
] PerlChildInitHandler handlers stack undef, creating
] pushing CODE ref into `PerlChildInitHandler' handlers
] ok
] loading perl module 'Apache'...ok
] loading perl module 'Tie::IxHash'...not ok
] Useless use of a constant in void context at /etc/httpd/conf/httpd.conf line 312.
] Useless use of a constant in void context at /etc/httpd/conf/httpd.conf line 312.
] perl_section: </Files>
] perl_section: </Directory>
] value of `mydomain.com' is not a HASH or ARRAY reference!.
] #
Apache doesn't start. If I include 'use strict' then the code
in the <Perl> isn't executed but apache starts.
In this case the following messages are generated:
Variable "%VirtualHost" is not imported at /etc/httpd/conf/httpd.conf line 306.
Global symbol "%VirtualHost" requires explicit package name at /etc/httpd/conf/httpd.conf line 306.
I know this has to work, I just wish I knew why it doesn't for me.
With gratitude if someone could show me the error of my ways...
-Greg
------------------------------------------------------------------
wheNufiNdu'RselFindAngeRwheNu'rThreAtenEdbyAstrAngeRwheNitlOoksLik
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic