On 10.12.2010 01:18, Dustin Chesterman wrote:
Hello all - I am having trouble getting logging to work for some modules, specifically mod_rewrite and mod_jk. Here is a portion of my httpd.conf. I get mod_jk logging for the startup process in my mod_jk.log but not the request level logging. But the forwarding is working. The rewrite.log has nothing in it ever. I thought it could be a problem with how i set up the modules butsince it's happening to two I thought I must have something wrong globally. Any suggestions on why this might be happening. My access.log is populating as expected. <IfModule jk_module> # We need a workers file exactly once and in the global server JkWorkersFile conf/workers.properties JkMountFile conf/uriworkermap.properties JkMountCopy All JkLogFile logs/mod_jk.log # (trace,debug,info,warn,error) JkLogLevel debug </IfModule> ErrorLog "logs/error.log" LogLevel debug <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b" common CustomLog "logs/access.log" common </IfModule> # Logs for rewrite module RewriteLog "logs/rewrite.log" RewriteLogLevel 9 \NameVirtualHost *:8080 NameVirtualHost *:8443 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # <VirtualHost *:8080> ServerName 127.0.0.1 ServerAlias localhost DocumentRoot "C:\Deploy\Accounts" JkMountCopy Off JkMount /* cmdevworker # Any way to make these case-insensitive???? JkUnMount /accounts|/* cmdevworker JkUnMount /Accounts|/* cmdevworker JkRequestLogFormat "%w %V %T" </VirtualHost> <VirtualHost *:8443> ServerName 127.0.0.1 ServerAlias localhost DocumentRoot "C:\Certain\Deploy\Accounts" RewriteEngine On RewriteCond ${SCRIPT_NAME} !^/accounts/(.*) [NC] RewriteRule (.*) /CF9R123/Register123$1 JkMountCopy Off JkMount /* cmdevworker JkUnMount /Accounts|/* cmdevworker JkUnMount /accounts|/* cmdevworker JkRequestLogFormat "%w %V %T" </VirtualHost>
RewriteLog and the mod_jk log file do not have much in common in terms of implementation.
Concerning mod_rewrite: the docs tell us:By default, mod_rewrite configuration settings from the main server context are not inherited by virtual hosts. To make the main server settings apply to virtual hosts, you must place the following directives in each <VirtualHost> section:
RewriteEngine On RewriteOptions InheritThis is especially true for the RewriteLogLevel. Th default log level is 0, which doesn't log anything and is still active in all your VHosts.
Concerning mod_jk: since you hav JkLogLevel debug, you should see *lots* of log lines for each request and also during startup of the web server. Do you see those types of messages? Is it only the additional one line per request "JkRequestLogFormat" you are missing?
If so I would expect that you actually are handling the requests by some other VHost which does not include the "JkRequestLogFormat" item. Try setting it into the global server. It should get inherited by each VHost.
Regards, Rainer --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx