{"id":17134249,"url":"https://github.com/fnichol/iocage-plugin-nginx","last_synced_at":"2026-04-24T21:31:54.854Z","repository":{"id":48913835,"uuid":"181997122","full_name":"fnichol/iocage-plugin-nginx","owner":"fnichol","description":"An iocage plugin for nginx, a Robust and small WWW server.","archived":false,"fork":false,"pushed_at":"2021-07-05T22:14:51.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T09:59:43.890Z","etag":null,"topics":["freebsd","freenas","freenas-plugin","iocage","nginx","trueos","trueos-plugin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fnichol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-18T01:49:54.000Z","updated_at":"2021-07-05T22:13:47.000Z","dependencies_parsed_at":"2022-08-27T02:39:44.387Z","dependency_job_id":null,"html_url":"https://github.com/fnichol/iocage-plugin-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fnichol/iocage-plugin-nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Fiocage-plugin-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Fiocage-plugin-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Fiocage-plugin-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Fiocage-plugin-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fnichol","download_url":"https://codeload.github.com/fnichol/iocage-plugin-nginx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fnichol%2Fiocage-plugin-nginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["freebsd","freenas","freenas-plugin","iocage","nginx","trueos","trueos-plugin"],"created_at":"2024-10-14T19:44:27.636Z","updated_at":"2026-04-24T21:31:54.834Z","avatar_url":"https://github.com/fnichol.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iocage-plugin-nginx\n\nAn [iocage][] plugin for [nginx][], a Robust and small WWW server.\n\n[iocage]: https://github.com/iocage/iocage\n[nginx]: https://www.nginx.com/\n\n|         |                                      |\n| ------: | ------------------------------------ |\n|      CI | [![CI Status][badge-ci-overall]][ci] |\n| License | [![License][badge-license]][license] |\n\n**Table of Contents**\n\n\u003c!-- toc --\u003e\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Enabling TLS Mode with an SSL Certificate](#enabling-tls-mode-with-an-ssl-certificate)\n  - [Persisting Data](#persisting-data)\n- [Configuration](#configuration)\n  - [User Serviceable Configuration](#user-serviceable-configuration)\n  - [`nginx_mode`](#nginx_mode)\n  - [System Configuration](#system-configuration)\n  - [`nginx_listen_addr`](#nginx_listen_addr)\n- [Code of Conduct](#code-of-conduct)\n- [Issues](#issues)\n- [Contributing](#contributing)\n- [Release History](#release-history)\n- [Authors](#authors)\n- [License](#license)\n\n\u003c!-- tocstop --\u003e\n\n## Installation\n\nThis plugin can be installed via the [fnichol/iocage-plugin-index][index] plugin\ncollection which is not installed on TrueOS or FreeBSD by default. For example,\nto install the plugin with a name of `nginx` and a dedicated IP address:\n\n```sh\n# Variables\njail=www\nip_addr=10.200.0.110\n```\n\n```sh\nsudo iocage fetch \\\n  -g https://github.com/fnichol/iocage-plugin-index \\\n  -P nginx \\\n  --name $jail \\\n  ip4_addr=\"vnet0|$ip_addr\"\n```\n\n[index]: https://github.com/fnichol/iocage-plugin-index\n\n## Usage\n\n### Enabling TLS Mode with an SSL Certificate\n\nTo enable TLS you will need a public SSL certificate (i.e. a `cert.pem` file)\nand the private server key (i.e. a `key.pem` file) installed into the nginx\nconfiguration directory of the plugin's jail. Assuming a running installed\nplugin called `www` with a jail mount point of `/mnt/tank/iocage/jails/www` in\nthe host system, the following will setup nginx to run under HTTPS:\n\n```sh\n# Variables\njail=www\njail_mnt=/mnt/tank/iocage/jails/$jail\n\ncert=/tmp/cert.pem\nkey=/tmp/key.pem\n```\n\n```sh\nsudo install -p -m 0644 $cert $jail_mnt/root/usr/local/etc/nginx/cert.pem\nsudo install -p -m 0600 $key $jail_mnt/root/usr/local/etc/nginx/key.pem\nsudo iocage exec $jail plugin config set nginx_mode https\nsudo iocage exec $jail plugin services restart\n```\n\n### Persisting Data\n\nThere is 1 primary directory that may contain data in an nginx jail:\n\n- `/usr/local/www/nginx` The web site content served up by nginx\n\nA good strategy is to create a ZFS dataset for this directory or use an existing\ndataset and mount it into the jail. This way, the jail can be destroyed and\nlater re-created without losing the served up web content.\n\n```sh\n# Variables\njail=www\nmnt=/mnt/tank/website\n```\n\n```sh\n# Attach an existing ZFS dataset to be served\nsudo iocage exec $jail rm -rf /usr/local/www/nginx\nsudo iocage exec $jail mkdir /usr/local/www/nginx\nsudo iocage fstab -a $jail \"$mnt /usr/local/www/nginx nullfs ro 0 0\"\n\n# Restart the nginx service\nsudo iocage exec $jail plugin services restart\n```\n\n## Configuration\n\n### User Serviceable Configuration\n\nThe following configuration is intended to be modified by a plugin user.\n\n### `nginx_mode`\n\nWhether or not TLS is being used for the service. See the TLS section for more\ninformation regarding how to install an SSL certificate.\n\n- default: `\"http\"`\n- valid values: `\"http\"`|`\"https\"`|`\"https-only\"`\n\nNote that `\"https-\"` mode runs the service on `HTTP` and `HTTPS` whereas\n`\"https-only\"` mode only runs on `HTTPS`.\n\nTo change this value, use the installed `plugin` program and restart the\nservices to apply the updated configuration:\n\n```sh\nplugin config set nginx_mode http\nplugin services restart\n```\n\n### System Configuration\n\nThe following configuration is used to configure and setup the services during\npost installation and is therefore not intended to be changed or modified by a\nplugin user.\n\n### `nginx_listen_addr`\n\nListen address for the service.\n([nginx reference](http://nginx.org/en/docs/http/ngx_http_core_module.html#listen))\n\n- default: `\"0.0.0.0\"`\n\n## Code of Conduct\n\nThis project adheres to the Contributor Covenant [code of\nconduct][code-of-conduct]. By participating, you are expected to uphold this\ncode. Please report unacceptable behavior to fnichol@nichol.ca.\n\n## Issues\n\nIf you have any problems with or questions about this project, please contact us\nthrough a [GitHub issue][issues].\n\n## Contributing\n\nYou are invited to contribute to new features, fixes, or updates, large or\nsmall; we are always thrilled to receive pull requests, and do our best to\nprocess them as fast as we can.\n\nBefore you start to code, we recommend discussing your plans through a [GitHub\nissue][issues], especially for more ambitious contributions. This gives other\ncontributors a chance to point you in the right direction, give you feedback on\nyour design, and help you find out if someone else is working on the same thing.\n\n## Release History\n\nThis project uses a \"deployable main\" strategy, meaning that the `main` branch\nis assumed to be working and production ready. As such there is no formal\nversioning process and therefore also no formal changelog documentation.\n\n## Authors\n\nCreated and maintained by [Fletcher Nichol][fnichol] (\u003cfnichol@nichol.ca\u003e).\n\n## License\n\nLicensed under the Mozilla Public License Version 2.0 ([LICENSE.txt][license]).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the MPL-2.0 license, shall be\nlicensed as above, without any additional terms or conditions.\n\n[badge-license]: https://img.shields.io/badge/License-MPL%202.0%20-blue.svg\n[badge-ci-overall]:\n  https://api.cirrus-ci.com/github/fnichol/iocage-plugin-nginx.svg\n[ci]: https://cirrus-ci.com/github/fnichol/iocage-plugin-nginx\n[code-of-conduct]:\n  https://github.com/fnichol/iocage-plugin-nginx/blob/main/CODE_OF_CONDUCT.md\n[fnichol]: https://github.com/fnichol\n[issues]: https://github.com/fnichol/iocage-plugin-nginx/issues\n[license]: https://github.com/fnichol/iocage-plugin-nginx/blob/main/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnichol%2Fiocage-plugin-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnichol%2Fiocage-plugin-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnichol%2Fiocage-plugin-nginx/lists"}