>>>> I see a hit in the access logs. >>>> >>>> I get an Internal Server Error. >>>> >>>> And still, the error log is completely silent. This is my problem. >>>> >>>> Without server errors I get a bit lost. >>>> >>> This seems to be a config with VirtualHosts. >>> Are you sure that you're looking in the correct error logs ? >>> Some errors will be in the "main" log, others in the virtual >>> host logs. >>> Also, "print STDERR" is not necessarily the best way to send >>> an error to the logs, under mod_perl 2. >> >> While I am using Virtual Hosts, the PerlPostConfigHandler is defined >> outside any of them. >> >> On a positive note, when I change from "print STDERR" to open my $fh, >> ">>/tmp/abc" in my PostConfig handler, the file is written. >> >> I checked the whole machine, there are no other error logs. Do I need >> to set up virtual host error logs separately, and they just go to >> /dev/null without such configuration? >> > Separately from Torsten's answers, as an appendix. > > No, they will not just be discarded to /dev/null. > > The "main" part of the configuration (outside of <VirtualHost> > sections), acts as a series of default values, inherited by > all VirtualHosts. A <VirtualHost> /may/ override any > parameter with its own value, which takes precedence. But it > does not have to.
Thanks. > Error messages may end up in the system's SYSLOG logs, depending on how > the Apache startup script of your system configures things (like in > /etc/init.d/apache2 or so). The imagination of Linux package creators > is boundless.. > Check /var/log/daemon.log and similar. I've built this all from source. That's the way I've been using Apache/mod_perl for a long time now. There's nothing happening under /var/log. I even tried this, as root: > cd / > touch STAMP [ Try to load page and get internal server error ] > find . -newer STAMP 2>/dev/null | egrep -v "^./(proc|sys|dev)/" ./home/mp2/builds/httpd/httpd-2.2.22/logs/access_log-dev9 ./home/mp2/builds/httpd/httpd-2.2.22/logs/clickstream ./var/spool/postfix/public/qmgr ./var/spool/postfix/public/pickup Now that I know PostConfig is working, I made a nearly identical PostReadRequestHandler, the only difference being it writes to a different /tmp file. I also put its config in server scope, rather than in any Directory, Location or Files section. It does not get called. So, I tried a ChildInitHandler. Surely that would need to be called, right? It does not. I don't know if it will do any good, but here's the last of the strace output from the parent process before it exits and leaves 1 root process and two (the correct number) of apache children running as "web" (the correct user), around. stat("/home/jnarins/src/dev9/etc/httpd/httpd.conf", {st_mode=S_IFREG|0644, st_size=3923, ...}) = 0 open("/home/jnarins/src/dev9/etc/httpd/httpd.conf", O_RDONLY) = 5 fstat(5, {st_mode=S_IFREG|0644, st_size=3923, ...}) = 0 read(5, "# $Id: httpd.conf 10123 2011-10-"..., 4096) = 3923 open("/home/mp2/builds/httpd/httpd-2.2.22/modules/mod_perl.so", O_RDONLY) = 6 read(6, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\361\3\0\0\0\0\0"..., 832) = 832 fstat(6, {st_mode=S_IFREG|0775, st_size=1847927, ...}) = 0 mmap(NULL, 3811048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0x2ad4d464d000 mprotect(0x2ad4d47e5000, 2093056, PROT_NONE) = 0 mmap(0x2ad4d49e4000, 49152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x197000) = 0x2ad4d49e4000 close(6) = 0 open("/home/mp2/builds/apr-util/apr-util-1.4.1/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/tls/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/mp2/builds/apr/apr-1.4.6/lib/libnsl.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 6 fstat(6, {st_mode=S_IFREG|0644, st_size=66554, ...}) = 0 mmap(NULL, 66554, PROT_READ, MAP_PRIVATE, 6, 0) = 0x2ad4d49f0000 close(6) = 0 open("/lib64/libnsl.so.1", O_RDONLY) = 6 read(6, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240@@,=\0\0\0"..., 832) = 832 fstat(6, {st_mode=S_IFREG|0755, st_size=114352, ...}) = 0 mmap(0x3d2c400000, 2194096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0x3d2c400000 mprotect(0x3d2c415000, 2093056, PROT_NONE) = 0 mmap(0x3d2c614000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x14000) = 0x3d2c614000 mmap(0x3d2c616000, 6832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3d2c616000 close(6) = 0 open("/home/mp2/builds/apr-util/apr-util-1.4.1/lib/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/tls/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/lib64/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/home/mp2/builds/apr/apr-1.4.6/lib/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory) open("/lib64/libutil.so.1", O_RDONLY) = 6 read(6, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\16\3408=\0\0\0"..., 832) = 832 fstat(6, {st_mode=S_IFREG|0755, st_size=18152, ...}) = 0 mmap(0x3d38e00000, 2105616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 6, 0) = 0x3d38e00000 mprotect(0x3d38e02000, 2093056, PROT_NONE) = 0 mmap(0x3d39001000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 6, 0x1000) = 0x3d39001000 close(6) = 0 mprotect(0x3d39001000, 4096, PROT_READ) = 0 mprotect(0x3d2c614000, 4096, PROT_READ) = 0 munmap(0x2ad4d49f0000, 66554) = 0 read(5, "", 4096) = 0 close(5) = 0 chdir("/") = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2ad4d464bd20) = 9011 exit_group(0) = ? Josh Narins Director of Application Development SeniorBridge 845 Third Ave 7th Floor New York, NY 10022 Tel: (212) 994-6194 Mobile: (917) 488-6248 Fax: (212) 994-4260 jnar...@seniorbridge.com SeniorBridge Managing Complex Chronic Care http://www.seniorbridge.com SeniorBridge Statement of Confidentiality: The contents of this email message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. Any dissemination, distribution or copying of this email by an unintended or mistaken recipient is strictly prohibited. In said event, kindly reply to the sender and destroy all entries of this message and any attachments from your system. Thank you.