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
49
README.md
49
README.md
|
@ -10,46 +10,41 @@ Requirements
|
||||||
- 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 !**
|
||||||
|
|
2
init.lua
2
init.lua
|
@ -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'
|
||||||
|
|
Loading…
Add table
Reference in a new issue