Skip to content

Instantly share code, notes, and snippets.

@ornicar
Created May 1, 2012 12:28
Show Gist options
  • Select an option

  • Save ornicar/2567679 to your computer and use it in GitHub Desktop.

Select an option

Save ornicar/2567679 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name lichess.org ~^\w\w\w?\.lichess\.org$;
root /home/lichess/web;
access_log off;
error_log /home/log/nginx/lichess.error.log;
location /lila/api/ {
allow 127.0.0.1;
deny all;
proxy_pass http://127.0.0.1:9000/api/;
}
location /lila/ {
proxy_pass http://127.0.0.1:9000/;
}
location /monitor {
root /usr/share/munin/www/;
index index.html;
rewrite /monitor/(.*)$ /$1;
break;
}
location / {
root /home/lichess/web/;
index index.php;
# serve static files directly
if (-f $request_filename) {
expires 12M;
break;
}
rewrite ^(.*) /index.php last;
}
location ~ \.php {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/lichess/web/$fastcgi_script_name;
include fastcgi_params;
}
}
@salari20031

Copy link
Copy Markdown

Iam progammer and chessplayer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment