Mooshak Configuration Ubuntu 12.04
Mooshak is the best available automated judge for coding events.The configuration is a bit tricky and is summarized here.
Step 1:Install Ubuntu 12.04
Step 2:Open the terminal and become the root,using sudo su
Step 3:Install Packages apache2,tcl,libxml2-utils,xsltproc,apache2-suexec-custom using the command
<VirtualHost *:80>
DocumentRoot /home/mooshak/public_html
SuexecUserGroup mooshak mooshak
<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
</Directory>
</VirtualHost>
Note:If you choose not to clear the file,you will have to use a different port,say 8080,by changing the first line to <Virtualhost *:8080> .Also Add the following to /etc/apache2/ports.conf
NameVirtualHost *:8080
Listen 8080
By doing this you will be burdening your server by running two servers together,one in port 80 and other in 8080.Do this only if absolutely necessary.
Step 1:Install Ubuntu 12.04
Step 2:Open the terminal and become the root,using sudo su
Step 3:Install Packages apache2,tcl,libxml2-utils,xsltproc,apache2-suexec-custom using the command
sudo apt-get install apache2 tcl libxml2-utils xsltproc apache2-suexec-custom
Step 4:Edit file /etc/apache2/httpd.conf as follows
servername localhost
Step 5:Download Mooshak. Extract it and cd to the directory.
Step 6:Now you are at the extracted directory of the mooshak.Run the following command
./install
Step 7:Edit the file /etc/apache2/suexec/www-data.Delete all the contents and add the following lines.
/home/mooshak
/home/mooshak
/home/mooshak
/home/mooshak
Step 8:Run the following commands
cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/userdir.conf
sudo ln -s ../mods-available/userdir.load
sudo ln -s ../mods-available/suexec.load
Step 9:Open the file /etc/apache2/sites-available/default. If you wish to run only mooshak in the server clear the file and add the following.Else append it at the end of the file.
DocumentRoot /home/mooshak/public_html
SuexecUserGroup mooshak mooshak
<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
</Directory>
</VirtualHost>
Note:If you choose not to clear the file,you will have to use a different port,say 8080,by changing the first line to <Virtualhost *:8080> .Also Add the following to /etc/apache2/ports.conf
NameVirtualHost *:8080
Listen 8080
By doing this you will be burdening your server by running two servers together,one in port 80 and other in 8080.Do this only if absolutely necessary.
Step 10: Finally open /etc/apache2/mods-available/alias.conf and edit the line
Alias /icons/ "/usr/share/apache2/icons/"
to
Alias /icon/ "/usr/share/apache2/icons/"
Step 11:Restart the server using the command
sudo /etc/init.d/apache2 restart
Step 12:Use your browser to go to 127.0.0.1 and you should see the mooshak running.:-)