mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Update README.md
This commit is contained in:
parent
dec4ed143a
commit
aeb79ea929
3 changed files with 24 additions and 29 deletions
51
README.md
51
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 !**
|
||||
|
|
2
init.lua
2
init.lua
|
@ -13,4 +13,4 @@ cache = {}
|
|||
connections = {}
|
||||
|
||||
-- Path of the configuration
|
||||
conf_path = 'conf.json'
|
||||
conf_path = '/etc/ssowat/conf.json'
|
||||
|
|
Loading…
Add table
Reference in a new issue