Thursday, April 26, 2007

"mono --version" and "mcs --version" return the version of the Mono distribution.

Mono C# compiling can be done for following following runtimes
  • mcs: compiler to target 1.1 runtime.
  • gmcs: compiler to target the 2.0 runtime.
To create a dynamic library using the gmcs just use the following command.

"gmcs -t:library -out:sss.dll -recurse:Com.test.foo.SSL\*.cs"

To execute the compiled exes use the following command.
"mono foo.exe "

To compile with gtk# for UIs use the following command.
mcs -pkg:gtk-sharp-2.0 -recurse:Com.test.foo.SSL\*.cs

Tuesday, April 24, 2007

Instructions on how to run XWiki on JBoss

JBoss installation

These instructions are for the JBoss Application Server 4.0.X and MySQL ; other versions may differ.

* Download and install JBoss Application Server . It's usually as simple as unzipping it in a directory. Let's call this directory [JBOSS_HOME].
* (optional) If you want to modify the port on which JBoss is running, edit [JBOSS_HOME]/server/default/deploy/bossweb-tomcat55.sar/server.xml. Search for "8080" and replace with the port value you wish to use. Change the [JBOSS_HOME]/server/default/deploy/http-invoker.sar/META-INF/jboss-service.xml using the same way to the port you like.

Configure JBoss

* If your datasource is a MySQL database then copy the file called "mysql-xa-ds.xml" in to the "[JBOSS_HOME]/server/default/deploy" directory.
* Put the relevant mysql java connector jar file to the "[JBOSS_HOME]/server/default/lib".


Install XWiki application

* Add a jboss-web.xml to the "WEB-INF" directory in the XWiki WAR.
* Copy the XWiki WAR into a directory named xwiki/ in [JBOSS_HOME]/server/default/deploy.

Thursday, April 19, 2007

Apache Http to Https

I wanted to redirect all the http requests coming to Apache web server to https requests. I found a simple solution to do that. This method may not be the ideal way for that but it worked for me.

first make sure that /etc/httpd/conf/httpd.conf contains the following line

LoadModule rewrite_module modules/mod_rewrite.so

Then add following lines to httpd.conf
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*)$ https://www.foo.com/$1 [L,R]

finally restart the apache using
service httpd restart

last but not least test it using http://www.your.domain.com/
then you will see https://www.your.domain.com/

hope this method works for all...............