Skip to content

Commit

Permalink
Merge pull request #52 from Moesif/multiple-directives-readme
Browse files Browse the repository at this point in the history
Update README: warning On multiple directives
  • Loading branch information
dgilling authored Mar 1, 2021
2 parents 2421960 + 37cf426 commit 58da2bb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ luarocks install --server=http://luarocks.org/manifests/moesif lua-resty-moesif

## How to use (Generic OpenResty)

Edit your `nginx.conf` file to add the Moesif plugin.
Edit your `nginx.conf` file to add the Moesif plugin.

If necessary, replace `/usr/local/openresty/luajit/share/lua/5.1/resty` with the correct lua plugin installation path.
This can be found using `find / -name "moesif" -type d`. If there are multiple paths, just pick one.

> NGINX supports using a directive like `log_by_lua*` only once in the same section. If you're already using the same NGINX directives used by Moesif, you may need to adjust your config. [See OpenResty docs](https://openresty.org/en/faq.html#why-cant-i-use-duplicate-configuration-directives).
```nginx
lua_shared_dict moesif_conf 5m;
Expand Down Expand Up @@ -75,10 +77,12 @@ Installing Moesif plugin for [3Scale API Gateway](https://www.3scale.net/) is th
1. Add 3scale specific configuration options to fetch additional user context from 3scale management API
2. Replace `send_event.lua`, with `send_event_3Scale.lua`

Edit your `nginx.conf` file to configure Moesif OpenResty plugin:
Replace `/usr/share/lua/5.1/lua/resty` with the correct lua plugin installation path, if necessary.
Edit your `nginx.conf` file to add the Moesif plugin.

If necessary, replace `/usr/share/lua/5.1/lua/resty` with the correct lua plugin installation path.
This can be found using `find / -name "moesif" -type d`. If there are multiple paths, just pick one.

_If you're unsure of the installation path, you can find it via: `find / -name "moesif" -type d`. Sometimes luarocks installs packages in multiple locations, just choose one._
> NGINX supports using a directive like `log_by_lua*` only once in the same section. If you're already using the same NGINX directives used by Moesif, you may need to adjust your config. [See OpenResty docs](https://openresty.org/en/faq.html#why-cant-i-use-duplicate-configuration-directives).
Below is a sample configuration for 3scale:

Expand Down

0 comments on commit 58da2bb

Please sign in to comment.