Nginx

Framework
Nginx
Category
Servers
Publisher
Jetify
{
  "packages": [
    "nginx@latest"
  ],
  "shell": {}
}

Nginx

NGINX can be automatically configured by Devbox via the built-in NGINX Plugin. This plugin will activate automatically when you install NGINX using devbox add nginx

Example Repo

Open In Devbox.sh

Adding NGINX to your Shell

Run devbox add nginx, or add the following to your devbox.json

  "packages": [
    "nginx@latest"
  ]

This will install the latest version of NGINX. You can find other installable versions of NGINX by running devbox search nginx. You can also view the available versions on Nixhub

NGINX Plugin Details

Services

  • nginx

Use devbox services start|stop nginx to start and stop the NGINX service in the background

Helper Files

The following helper files will be created in your project directory:

  • devbox.d/nginx/nginx.conf
  • devbox.d/nginx/fastcgi.conf
  • devbox.d/web/index.html

Note that by default, NGINX is configured with ./devbox.d/web as the root directory. To change this, you should modify ./devbox.d/nginx/nginx.conf

Environment Variables

NGINX_CONFDIR=devbox.d/nginx/nginx.conf
NGINX_PATH_PREFIX=.devbox/virtenv/nginx
NGINX_TMPDIR=.devbox/virtenv/nginx/temp

Notes

You can easily configure NGINX by modifying these env variables in your shell's init_hook

To customize:

  • Use $NGINX_CONFDIR to change the configuration directory
  • Use $NGINX_LOGDIR to change the log directory
  • Use $NGINX_PIDDIR to change the pid directory
  • Use $NGINX_RUNDIR to change the run directory
  • Use $NGINX_SITESDIR to change the sites directory
  • Use $NGINX_TMPDIR to change the tmp directory. Use $NGINX_USER to change the user
  • Use $NGINX_GROUP to customize.

You can also customize the nginx.conf and fastcgi.conf stored in devbox.d/nginx

README.md

Level up your dev environment

Checkout the Devbox and Launchpad open-source codebases on Github. Feature requests are always welcome.
Try Devbox Cloud
YOUR INPUT COUNTS

Join the community

Discuss ideas, uses and builds with the Jetpack team and others.