You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2013/03/28 17:20:07 UTC

[users@httpd] JkWorkerFile (mod_jk)

Apache2.12.x on SLES11 SP2.
I am trying to get apache2 mod_jk working with apache to access a webapp. I have loaded the mod_jk module and configured a virtual host and workers.properties file like so:

virtualhost:
<VirtualHost *:80>
    ServerName share.domain.com

<IfModule mod_jk.c>

    # The following line makes apache aware of the location of
    # the /jsp-examples context
    Alias /share "/opt/alfresco/tomcat/webapps/share"
    <Directory "/opt/alfresco/tomcat/webapps">
	Options Indexes FollowSymLinks
	allow from all
    </Directory>

    # The following line mounts all JSP files and the /servlet/ uri to tomcat
    #JkMount /servlets-examples/servlet/* ajp13
    JkMount /share/*.jsp ajp13

    # The following line prohibits users from directly accessing WEB-INF
    <Location "/share/WEB-INF/">
	AllowOverride None
	deny from all
    </Location>

</IfModule>

</VirtualHost>

jk.conf:
<IfModule mod_jk.c>

    JkWorkersFile /opt/alfresco/tomcat/workers.properties
    JkLogFile /var/log/alfresco/mod_jk.log
    JkShmFile /var/log/alfresco/shm

    # Log level to be used by mod_jk
    JkLogLevel error

</IfModule>

When i restart apache, i get:
JkWorkerFile only allowed once
and apache does not start until i comment out the jkworkerfile line in jk.conf.
So my question is, does apache already have a jkworkerfile somewhere that i do not know about? I searched for workers.properties and see only 2, 1 is mine that i created and the other is in /usr/share/doc/packages/apache2-mod-jk.
I do not have tomcat installed outside of the tomcat the webapp (which is alfresco) installed.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] JkWorkerFile (mod_jk)

Posted by Chris Arnold <ca...@electrichendrix.com>.
On Mar 28, 2013, at 12:26 PM, "Tom Evans" wrote: 

> Are you including this config file multiple times? Perhaps once 
> explicitly, and once as a 

>That I know of, this is the only time it is being called. With that said, in httpd.conf I have an include statement pointing to /etc/apache2 
>/conf.d. Maybe jk.conf is placed in a place where it is automatically being read/loaded and my file reads/loads it also? 

Ok, i moved the jk.conf file to .opt/alfresco/tomcat/conf and now i do not get the "only allowed once" described in a previous post. 
However, now when accessing http://share.domain.com, the result is directories and files are listed, the jsp files are not running. Here is my complete setup: 
jk.conf- 
# simple configuration for apache (for AJP connector, modul mod_jk.so) 

<IfModule mod_jk.c> 

JkWorkersFile /opt/alfresco/tomcat/workers.properties 
JkLogFile /var/log/alfresco/mod_jk.log 
JkShmFile /var/log/alfresco/shm 

# Log level to be used by mod_jk 
JkLogLevel error 

# The following line mounts all JSP files and the /servlet/ uri to tomcat 
#JkMount /servlets-examples/servlet/* ajp13 
JkMount /share/*.jsp ajp13 

</IfModule> 

virtualhost- 
<VirtualHost *:80> 
ServerName share.domain.com 

#RewriteEngine On 
#RewriteCond %{REQUEST_URI} !^/share/ 
#RewriteCond %{HTTPS} on 
#RewriteRule ^/. http://share.paradixent.com/share/ [P] 
#JkMount /share/* worker1 

<IfModule mod_jk.c> 


# The following line makes apache aware of the location of 
# the /jsp-examples context 
Alias /share "/opt/alfresco/tomcat/webapps/share" 
<Directory "/opt/alfresco/tomcat/webapps/share"> 
Options Indexes FollowSymLinks 
allow from all 
</Directory> 

# The following line mounts all JSP files and the /servlet/ uri to tomcat 
#JkMount /servlets-examples/servlet/* ajp13 
JkMount /share/*.jsp ajp13 

# The following line prohibits users from directly accessing WEB-INF 
<Location "/share/WEB-INF/"> 
#AllowOverride None 
deny from all 
</Location> 

# if not specified, the global error log is used 
ErrorLog /var/log/apache2domain.com-error_log 
CustomLog /var/log/apache2/domain.com-access_log combined 

</IfModule> 

</VirtualHost> 

httpd.conf- 
# mod_jk 
Include /opt/alfresco/tomcat/conf/jk.conf 

Mod_jk is loaded: 
web:~ # /usr/sbin/httpd2 -M 
Loaded Modules: 
....... 
jk_module (shared) 
perl_module (shared) 
php5_module (shared) 
Syntax OK 


Here is the log from apache: 
[Thu Mar 28 18:40:14 2013] [error] [client pub ip] proxy: Error reading from remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var 
[Thu Mar 28 18:40:28 2013] [error] [client pub ip] (70007)The timeout specified has expired: proxy: error reading status line from remote server share.paradixent.com 
[Thu Mar 28 18:40:28 2013] [error] [client pub ip] proxy: Error reading from remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var 


Any ideas why the jsp's are being listed instead of running? 

Spam: Re: [users@httpd] JkWorkerFile (mod_jk)

Posted by Chris Arnold <ca...@electrichendrix.com>.
On Mar 28, 2013, at 12:26 PM, "Tom Evans" wrote:

> Are you including this config file multiple times? Perhaps once
> explicitly, and once as a

That I know of, this is the only time it is being called. With that said, in 
httpd.conf I have an include statement pointing to /etc/apache2/conf.d. 
Maybe jk.conf is placed in a place where it is automatically being 
read/loaded and my file reads/loads it also?

Re: [users@httpd] JkWorkerFile (mod_jk)

Posted by Chris Arnold <ca...@electrichendrix.com>.
On Mar 28, 2013, at 12:26 PM, "Tom Evans" <te...@googlemail.com> wrote:

> Are you including this config file multiple times? Perhaps once
> explicitly, and once as a 

That I know of, this is the only time it is being called. With that said, in httpd.conf I have an include statement pointing to /etc/apache2/conf.d. Maybe jk.conf is placed in a place where it is automatically being read/loaded and my file reads/loads it also?

Re: [users@httpd] JkWorkerFile (mod_jk)

Posted by Tom Evans <te...@googlemail.com>.
On Thu, Mar 28, 2013 at 4:20 PM, Chris Arnold
<ca...@electrichendrix.com> wrote:
> Apache2.12.x on SLES11 SP2.
> I am trying to get apache2 mod_jk working with apache to access a webapp. I have loaded the mod_jk module and configured a virtual host and workers.properties file like so:
>
> virtualhost:
> <VirtualHost *:80>
>     ServerName share.domain.com
>
> <IfModule mod_jk.c>
>
>     # The following line makes apache aware of the location of
>     # the /jsp-examples context
>     Alias /share "/opt/alfresco/tomcat/webapps/share"
>     <Directory "/opt/alfresco/tomcat/webapps">
>         Options Indexes FollowSymLinks
>         allow from all
>     </Directory>
>
>     # The following line mounts all JSP files and the /servlet/ uri to tomcat
>     #JkMount /servlets-examples/servlet/* ajp13
>     JkMount /share/*.jsp ajp13
>
>     # The following line prohibits users from directly accessing WEB-INF
>     <Location "/share/WEB-INF/">
>         AllowOverride None
>         deny from all
>     </Location>
>
> </IfModule>
>
> </VirtualHost>
>
> jk.conf:
> <IfModule mod_jk.c>
>
>     JkWorkersFile /opt/alfresco/tomcat/workers.properties
>     JkLogFile /var/log/alfresco/mod_jk.log
>     JkShmFile /var/log/alfresco/shm
>
>     # Log level to be used by mod_jk
>     JkLogLevel error
>
> </IfModule>
>
> When i restart apache, i get:
> JkWorkerFile only allowed once
> and apache does not start until i comment out the jkworkerfile line in jk.conf.
> So my question is, does apache already have a jkworkerfile somewhere that i do not know about? I searched for workers.properties and see only 2, 1 is mine that i created and the other is in /usr/share/doc/packages/apache2-mod-jk.
> I do not have tomcat installed outside of the tomcat the webapp (which is alfresco) installed.
>

Are you including this config file multiple times? Perhaps once
explicitly, and once as a glob include?

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org