{"id":19251243,"url":"https://github.com/rexops/rex-nginx","last_synced_at":"2026-02-12T18:30:51.070Z","repository":{"id":138908052,"uuid":"61450962","full_name":"RexOps/rex-nginx","owner":"RexOps","description":"Nginx module for Rex","archived":false,"fork":false,"pushed_at":"2016-06-19T07:38:17.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-04T00:30:18.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Smarty","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RexOps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-18T20:18:30.000Z","updated_at":"2017-05-31T10:17:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"721206de-c784-4d6d-b801-05a0bbd9d792","html_url":"https://github.com/RexOps/rex-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RexOps/rex-nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RexOps","download_url":"https://codeload.github.com/RexOps/rex-nginx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-nginx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29376811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T18:17:34.915Z","status":"ssl_error","status_checked_at":"2026-02-12T18:17:34.495Z","response_time":55,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-09T18:21:17.471Z","updated_at":"2026-02-12T18:30:51.045Z","avatar_url":"https://github.com/RexOps.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rex Nginx module\n\nThis module setup nginx.\n\n## Tasks\n\n### setup\n\nCall this task to install nginx on your system.\n\n#### Parameters\n\n* ensure - Default: latest\n* conf_ensure, Create configuration - Default: present\n* service_ensure, Start service - Default: running\n* nginx_conf, Location of nginx.conf file - Default: /etc/nginx/nginx.conf\n* nginx_conf_template, Which template to use for nginx.conf - Default: templates/nginx/nginx.conf.tpl\n* mime_type_conf, Location of mime.types file - Default: /etc/nginx/mime.types\n* mime_type_conf_template, Which template to use for mime.types file. - Default: templates/nginx/mime.types.tpl\n* user - Default: nginx\n* worker_processes, How many worker processes - Default: 1\n* error_log_file, Where to log error messages - Default: /var/log/nginx/error.log\n* error_log_level - Default: warn\n* pid_file - Default: /var/run/nginx.pid\n* worker_connections, How many worker connections - Default: 1024\n* mime_type_file - Default: /etc/nginx/mime.types\n* default_type, Default mimetype to deliver - Default: application/octet-stream\n* log_format_main - Default: `$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\" \"$http_x_forwarded_for\"`\n* access_log - Default: /var/log/nginx/access.log\n* sendfile - Default: on\n* keepalive_timeout - Default: 65\n* gzip - Default: on\n* http_options, an array to add additional http options - Default: `[]`\n* http_include_files, Include configuration files - Default: `[\"/etc/nginx/conf.d/*.conf\"]`\n* events_options, Additional options for the events section. - Default: `[]`\n* main_options, Additional options for the main section. - Default: `[]`\n\n#### Example\n\n```perl\nuse Nginx;\n\ntask \"setup\", sub {\n  Nginx::setup;\n};\n```\n\n```perl\nuse Nginx;\n\ntask \"setup\", sub {\n  Nginx::setup {\n    ensure =\u003e 'present',\n    user =\u003e 'nobody',\n    http_options =\u003e [\n      'tcp_nopush on',\n      'foobar off',\n    ],\n    events_options =\u003e [\n      'xyz off',\n    ],\n    main_options =\u003e [\n      'abc 123',\n    ],\n  };\n};\n```\n\n\n## Resources\n\n### vhost\n\nCreate a virtual host.\n\n#### Parameters\n\n* ensure - Default: present\n* configuration_dir, Directory where to store the configuration file for this vhost - Default: /etc/nginx/conf.d\n* on_change, Hook to execute when this vhost changed - Default: `sub { service nginx =\u003e \"reload\"; }`\n* listen, Which ip:port to listen on - Default: 80\n* server_name, Virtualhost name - Default: localhost\n* access_log - Default: /var/log/nginx/log/$resource_name.access.log\n* access_log_format - Default: main\n* locations, HashRef to configure locations - Default:\n```perl\n{\n  '/' =\u003e {\n    root  =\u003e '/usr/share/nginx/html',\n    index =\u003e 'index.html index.htm',\n  },\n  '~ /\\.ht' =\u003e {\n    deny =\u003e 'all',\n  },\n}\n```\n\n* error_pages, HashRef to configure error pages - Default:\n```perl\n{\n  404               =\u003e '/404.html',\n  '500 502 503 504' =\u003e '/50x.html',\n};\n```\n* configuration, Which template to use for vhost generation - Default: templates/nginx/vhost.tpl\n\n\n#### Example\n\n```perl\nNginx::vhost \"ci.rexify.org\",\n  ensure =\u003e \"present\";\n```\n\n```perl\nNginx::vhost \"ci.rexify.org\",\n  ensure =\u003e \"present\",\n  locations =\u003e {\n    '/' =\u003e {\n      root  =\u003e '/usr/share/nginx/html',\n      index =\u003e 'index.html index.htm',\n    },\n    '~ /\\.ht' =\u003e {\n      deny =\u003e 'all',\n    },\n  };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexops%2Frex-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-nginx/lists"}