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

@ -7,49 +7,44 @@ Requirements
------------ ------------
- Nginx-extras from Debian wheezy-backports - Nginx-extras from Debian wheezy-backports
- lua-json - lua-json
- lua-ldap - lua-ldap
OR **OR**
- Nginx "Openresty" flavored : http://openresty.org/ - Nginx "Openresty" flavored : http://openresty.org/
- lua-ldap - 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 ```nginx
init_by_lua_file path/to/init.lua; init_by_lua_file /etc/ssowat/init.lua;
access_by_lua_file path/to/access.lua; access_by_lua_file /etc/ssowat/access.lua;
# SSO domain
server { server {
listen 80; listen 80; # Do not forget HTTPS for production
server_name mydomain.com;
root /var/www/mydomain.com;
location /ssowat { location /sso {
alias /var/www/ssowat; alias /etc/ssowat/portal;
default_type text/html; 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 = {} connections = {}
-- Path of the configuration -- Path of the configuration
conf_path = 'conf.json' conf_path = '/etc/ssowat/conf.json'