From aeb79ea92974b03afd8d93fb805d3749b1837868 Mon Sep 17 00:00:00 2001 From: Kload Date: Wed, 16 Oct 2013 20:47:37 +0200 Subject: [PATCH] Update README.md --- README.md | 51 +++++++++++++++------------------ init.lua | 2 +- login.html => portal/index.html | 0 3 files changed, 24 insertions(+), 29 deletions(-) rename login.html => portal/index.html (100%) diff --git a/README.md b/README.md index 9a6aa55..6df323f 100644 --- a/README.md +++ b/README.md @@ -7,49 +7,44 @@ Requirements ------------ - Nginx-extras from Debian wheezy-backports -- lua-json +- lua-json - lua-ldap -OR +**OR** - Nginx "Openresty" flavored : http://openresty.org/ - lua-ldap +Installation +------------ -Example Nginx conf ------------------- +```bash +git clone https://github.com/Kloadut/SSOwat /etc/ssowat +nano /etc/ssowat/conf.json +``` + +Nginx conf +---------- + +```bash +nano /etc/nginx/conf.d/ssowat.conf +``` ```nginx -init_by_lua_file path/to/init.lua; -access_by_lua_file path/to/access.lua; +init_by_lua_file /etc/ssowat/init.lua; +access_by_lua_file /etc/ssowat/access.lua; -# SSO domain server { - listen 80; - server_name mydomain.com; - root /var/www/mydomain.com; + listen 80; # Do not forget HTTPS for production - location /ssowat { - alias /var/www/ssowat; + location /sso { + alias /etc/ssowat/portal; default_type text/html; + index index.html; } - - location /whatever { - - ... - - } -} - -# Other domain -server { - listen 80; - server_name myotherdomain.com; - root /var/www/myotherdomain.com; - - ... - } ``` + +**That's it !** diff --git a/init.lua b/init.lua index fbb072e..5be7a36 100644 --- a/init.lua +++ b/init.lua @@ -13,4 +13,4 @@ cache = {} connections = {} -- Path of the configuration -conf_path = 'conf.json' +conf_path = '/etc/ssowat/conf.json' diff --git a/login.html b/portal/index.html similarity index 100% rename from login.html rename to portal/index.html