- Create
users.json
based onusers.dist.json
and make it writable by PHP - Make the folder
sessions
writable by PHP - The web server should target the folder
www
server {
root /path/to/soccer-session/www;
server_name soccer-session.com;
location / {
index index.php;
}
error_page 404 /404.html;
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
}
A user has an identifier and a name. And the identifier is unique.
The file users.json
represents a key-value dictionary. The key is the user identifier and the value is the user properties.
To create an administrator, you must set the type
property of the user to admin
.
Example:
{
"1234": {
"name": "John Doe",
"type": "admin"
},
"5678": {
"name": "Sarah Croche"
}
}