The Answer to Life, the Universe, and Everything

Monday, November 17, 2008

Apache2.2 : AuthUserFile Error

<Location /svn>
DAV svn
SVNParentPath "/var/svn"
AuthzSVNaccessFile /var/svn/.htpasswd
AuthType Basic
AUthName "Dev Project"
AuthUserFile /var/svn/.htpasswd

I set the basic authentication such as above which ended up the below error.
# /etc/init.d/apache2 reload
Syntax error on line 64 of /etc/apache2/mods-enabled/dav_svn.conf:
Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration

Since below,
$ for i in /usr/lib/apache2/modules/*; do strings $i | grep -q -i AuthUser && echo $i; done
$ ls /etc/apache2/mods-available/authn_file.load

You need to do as follow,
$ sudo /usr/sbin/a2enmod authn_file
Module authn_file installed; run /etc/init.d/apache2 force-reload to enable.
$ /usr/sbin/apache2ctl configtest
Syntax OK

Friday, November 14, 2008

JBoss Setting

After the installation of JBoss, here is the know-how of its setting.

1) Heap size
$ sudo vim $JBOSS/bin/run.conf

JAVA_OPTS="-Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="-Xms512m -Xmx768m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"

2) Port check
vim $JBOSS/server/default/deploy/jboss-web.deployer/server.xml

3) Transaction time out
vim $JBOSS/server/default/conf/jboss-service.xml


4) Thread number
vim server/default/deploy/jboss-web.deployer/server.xml


5) Log Output level by log4j
vim /opt/jboss-4.2.3.GA/server/default/conf/jboss-log4j.xml 
<priority value="WARN" />
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>

Thursday, November 13, 2008

Struts2 and Hibernate v3 Min. Lib.

Those are the minimum required libraries for Struts2 and Hibernate v3.