On Sun, 26 Aug 2001, allan wrote:

> im a bit confused – or perhaps bewildered about finally having installed
> mod_perl on mac osX.

Well, that's to be expected. It's a bit confusing first time through.

> these questions should apply cross platform 
> 
> 1) 
> yesterday im quite sure my httpd.conf file was /usr/local/apache/conf/httpd.conf.
> today (after having played around) it suddenly appears to be /etc/httpd/httpd.conf
> 

You don't say how you "played around" ... sounds like you installed apache
in two different locations. In any case, this isn't a mod_perl issue at
all ...


> can this be?
> can i actually tell the sever somehow to use the one in
> /usr/local/apache/conf where the other conf files are.
> 

httpd -f /path/to/your/httpd.conf

(Again, a very basic apache question. You really need to read the docs for
apache. If you keep asking questions like this folks are going to quickly
tire of helping you!)

> 
> the only reason i discovered this was because i wanted to change the
> number of child processes to only one. which brings me to:
> 
> 2)
> im experiencing some heavy modoule-caching annoyance i guess. if i run the
> simple hello.pm (see below) and make a very small change - the change
> might take effect immidiately in the browser but more frequently it will
> show a cached version of the page. 
> (i noticed a pattern in my access_log that the last number-field on the
> lines would be the same if the page didnt change)
> 

Do you know why you are running mod_perl with your apache? The
"modoule-caching annoyance" you speak of is the basic reason for the
existence of mod_perl ... the idea is that the perl code in your module
only gets compiled once rather than every time a user requests the URI.

If you change the code in the module you won't see the changes until a new
child process is spawned and compiles the new code (depending on your
config maybe not even then ...) 

Most static sites don't need mod_perl ... if you are just installing
apache for the first time maybe you should become familiar with running a
webserver before you move on to mod_perlifying it ... ?



> i have read a little about this problem but dont understand the soloution(s).

you can run httpd in single-process mode as you say, or you can look at
Apache::Reload ... this forces your code to be recompiled every time it
has changed (at the cost of checking out whether it has in fact changed,
every request). Try perldoc Apache::Reload ...

> for instance what is the exact procedure for httpd -x?
> is it like this command:
> 
> [localhost:/usr/local/apache/sbin] aju% httpd -x

Well, actually it's httpd -X ...

> 
> this command will do nothing on my system, not even complain.

You should not see anything at the command line. The daemon is running, in
single-process mode, still attached to the terminal in which you started
it, waiting for a request. This again is very basic apache operation. Have
you read the docs that come with your apache?


> if i manually configure my httpd.conf file to only one server-child i
> sometimes get two children?
> 

One parent, one child, probably.

> also there are some talk about global variables, but looking at the code
> i dont see any?
> 

There are quite a lot of talk about global variables, actually. It's a
pretty big deal with this stuff. You need to go to the mod_perl guide, and
spend _SEVERAL HOURS_ reading it and playing with your installation. If
you devote the necessary time to educating yourself, you'll figure most
of it out, and you can bring your tough questions to this list.

> allan

Good luck,

Nick

Reply via email to