WARNING: Work in progress.
Online judge for programming contest
git clone --recursive git@github.com:in-silico/utpjudge.git
-
Install nginx
aptitude update aptitude install nginx
-
Add basic dns configuration at '/etc/hosts'
127.0.1.1 judge.is 127.0.1.1 api.judge.is
-
Add basic configuration for nginx at '/etc/nginx/sites-available/default'
server {
listen 80;
server_name judge.is;
location / {
proxy_pass http://localhost:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server {
listen 80;
server_name api.judge.is;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
You (probably) will receive that error when try to update large files.
In order to fix that problem, you need to add the following in the http section:
client_max_body_size 50M;
in the '/etc/nginx/nginx.conf' file
NOTE: Remember to update the nginx server using nginx -s reload
as root.
In order to authenticate users with github you'll need to get your own keys from github.com
Register you app here https://github.com/settings/applications/new and then copy your private/public key into the config/oauth file In both the judge backend and the judge frontend.
NOTE: I strongly recommend you to use the following command to avoid sharing your keys:
git update-index --assume-unchanged config/oauth.js
Developed by In-silico.