readme start nginx

This commit is contained in:
Olof hagsand 2018-07-22 20:49:16 +02:00
parent 9776ee864f
commit f2d2b0a8c0
3 changed files with 27 additions and 2 deletions

View file

@ -22,6 +22,11 @@ Start nginx daemon
``` ```
sudo /etc/init.d nginx start sudo /etc/init.d nginx start
``` ```
Alternatively, start it via systemd:
```
sudo /etc/init.d/nginx start
sudo systemctl start start.service
```
Start clixon restconf daemon Start clixon restconf daemon
``` ```

View file

@ -132,7 +132,25 @@ You can access clixon via REST API using restconf, such as using
curl. GET, PUT, POST are supported. curl. GET, PUT, POST are supported.
You need a web-server, such as nginx, and start a restconf fcgi You need a web-server, such as nginx, and start a restconf fcgi
daemon, clixon_restconf. Read more in the restconf docs. daemon, clixon_restconf.
For example, using nginx, install, and edit config file: /etc/nginx/sites-available/default:
```
server {
...
location /restconf {
root /usr/share/nginx/html/restconf;
fastcgi_pass unix:/www-data/fastcgi_restconf.sock;
include fastcgi_params;
}
}
```
Start nginx daemon
```
sudo /etc/init.d/nginx start
```
Read more in the restconf docs.
Example: Example:
``` ```

View file

@ -19,7 +19,9 @@ routing example. It contains the following files:
## Compile and run ## Compile and run
Before you start, see [preparation](../doc/FAQ.md#do-i-need-to-setup-anything-important). Before you start,
* Make [group setup](../doc/FAQ.md#do-i-need-to-setup-anything-important)
* Setup [restconf](../doc/FAQ.md#how-do-i-use-restconf)
``` ```
cd example cd example