Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kongr45gpen/gamestats

BZFlag statistics website
https://github.com/kongr45gpen/gamestats

Last synced: 25 days ago
JSON representation

BZFlag statistics website

Awesome Lists containing this project

README

        

Please note that as some player names have slashes in them, that Apache by default blocks the encoding of slashes.

To work around this, we enable `AllowEncodedSlashes On` at the virtual directory level.

The application encodes them just fine, and will route them just fine, and there is no security issue with them - so it's safe to enable them

alias/virtual server config:
Please note that "AllowOverride" and "Options" settings:
"AllowOverride All"
"Options FollowSylinks"

apache Virtual Server Example:

ServerAdmin [email protected]
DocumentRoot "/var/www/BzStatsWeb/webroot"
ServerName mydomainname
AllowEncodedSlashes On

ErrorLog "logs/BzStatsWeb-error.log"
CustomLog "logs/BzStatsWeb-access.log" common


AllowOverride All
Options FollowSymLinks
Order allow,deny
Allow from all

Qore's included .htaccess file in the webroot gives friendly URL's, and routes everything properly to index.php.

If you would rather 'alias' the webroot from an existing site (meaning it will not be served from the site's root)
then you must set it up as follows:

alias /myAlias "/path/to/project/webroot"

Options FollowSymLinks
Order allow,deny
Allow from all
AllowEncodedSlashes On


RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?url=$1 [PT,L]

Here's a sample configuration file for nginx:

server {
listen 0.0.0.0:80;
server_name stats.domain.com;
root /path/to/project/webroot;

access_log /var/log/nginx/gamestats_access.log;
error_log /var/log/nginx/gamestats_error.log;

location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {
access_log off;
expires 30d;
}

location / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /usr/local/nginx/conf/fastcgi.conf;

index index.html index.htm index.php;

if (!-e $request_filename){
rewrite ^(.*)$ /index.php?url=$1
break;
}
}
}