You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2019/11/28 03:14:14 UTC

[GitHub] [incubator-apisix] chnliyong opened a new issue #914: Make apisix's production deployment **FHS**able

chnliyong opened a new issue #914: Make apisix's production deployment **FHS**able
URL: https://github.com/apache/incubator-apisix/issues/914
 
 
   Currently, `apisix_home`(`/usr/local/apisix`) is the `prefix` path of `OpenResty`,the configuration, temp data, log are all in this directory.
   In `Unix-like` environment, [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) is intuitive,
   1. Split conf of `apisix` and `openresty`, new directory `/etc/apisix/` for `apisix`'s conf, new directory `/etc/apisix/nginx/` for `OpenResty`.
   2. New directory `/var/lib/apisix` as `openresty`'s `prefix`, add `nginx_config.http.temp_directory` config item in `config.yaml`, the default vaule can be `tmp`, and make nginx's `*_temp_path` under this directory.
   3. New directory `/var/log/apisix` as `access_log` and `error_log`.
   4. New directory `/run/
   5. As OpenResty's worker process default is ran as `nobody` system user, we don't need create a user.
   6. Add `nginx_config.pidfile` config item in `config.yaml`,  the default vaule can `run/apisix.pid`
   
   Production:
   ```
   Configuartion location:
   ================
   /etc/apisix/config.yaml ...
   /etc/apisix/nginx/nginx.conf ...
   
   Need config in /etc/apisix/config.yaml:
   ===========
   nginx_config.error_log: /var/log/apisix/error.log
   nginx_config.http.access_log: /var/log/apisix/access.log
   nginx_config.http.temp_directory: /var/lib/apisix/tmp
   nginx_config.pidfile: /var/run/apisix.pid
   ===========
   
   OpenResty start command line:
   =======
   openresty -p /var/lib/apisix -c /etc/apisix/nginx/nginx.conf 
   ```
   
   Development:
   Almost keep the same, only add config item for production.
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services