Update README.md

This commit is contained in:
Kload 2013-10-16 20:47:37 +02:00
parent dec4ed143a
commit aeb79ea929
3 changed files with 24 additions and 29 deletions

View file

@ -10,46 +10,41 @@ Requirements
- 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 !**

View file

@ -13,4 +13,4 @@ cache = {}
connections = {}
-- Path of the configuration
conf_path = 'conf.json'
conf_path = '/etc/ssowat/conf.json'