{"id":31904145,"url":"https://github.com/cloudfoundry-community/nginx-buildpack","last_synced_at":"2025-10-13T13:47:43.164Z","repository":{"id":9587784,"uuid":"11505544","full_name":"cloudfoundry-community/nginx-buildpack","owner":"cloudfoundry-community","description":"A buildpack for hosting static HTML sites on Cloud Foundry using Nginx","archived":false,"fork":false,"pushed_at":"2018-09-09T15:04:35.000Z","size":1325,"stargazers_count":24,"open_issues_count":4,"forks_count":32,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-06-23T04:55:49.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","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/cloudfoundry-community.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}},"created_at":"2013-07-18T14:54:50.000Z","updated_at":"2024-02-09T14:27:38.000Z","dependencies_parsed_at":"2022-07-30T01:48:03.115Z","dependency_job_id":null,"html_url":"https://github.com/cloudfoundry-community/nginx-buildpack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cloudfoundry-community/nginx-buildpack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fnginx-buildpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fnginx-buildpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fnginx-buildpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fnginx-buildpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudfoundry-community","download_url":"https://codeload.github.com/cloudfoundry-community/nginx-buildpack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry-community%2Fnginx-buildpack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015339,"owners_count":26085685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-10-13T13:47:35.114Z","updated_at":"2025-10-13T13:47:43.158Z","avatar_url":"https://github.com/cloudfoundry-community.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEPRECIATED\nThis buildpack has been depreciated in favour of the more up to date (and better named) https://github.com/cloudfoundry-community/staticfile-buildpack.  Please use that instead.\n\n---\n\n# A buildpack for hosting static HTML websites on Cloud Foundry using Nginx\n\n\n## Using this buildpack as-is\n\nEnsure that your app's root folder has an `index.html` or `index.htm` or `Default.htm` file (which will be served as the default page).\n\nRun:\n\n```\ncf push --buildpack https://github.com/cloudfoundry-community/nginx-buildpack.git\n```\n\n## Custom configuration files\n\nYou can customise the configuration by adding a `nginx.conf` to your root folder.\n\nIf the buildpack detects this file it will be used in place of the built-in `nginx.conf`, and run through the\nsame erb processor.  An example of the most basic `nginx.conf` (this is the one included in the build pack's `conf` directory):\n\n```\nworker_processes 1;\ndaemon off;\n\nerror_log \u003c%= ENV[\"APP_ROOT\"] %\u003e/nginx/logs/error.log;\nevents { worker_connections 1024; }\n\nhttp {\n  log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] \"$request\" $status $body_bytes_sent';\n  access_log \u003c%= ENV[\"APP_ROOT\"] %\u003e/nginx/logs/access.log cloudfoundry;\n  default_type application/octet-stream;\n  include mime.types;\n  sendfile on;\n  gzip on;\n  tcp_nopush on;\n  keepalive_timeout 30;\n\n  server {\n    listen \u003c%= ENV[\"PORT\"] %\u003e;\n    server_name localhost;\n\n    location ~ /\\.ht { deny  all; }\n    location / {\n      root \u003c%= ENV[\"APP_ROOT\"] %\u003e/public;\n      index index.html index.htm Default.htm;\n    }\n  }\n}\n```\n\n## Building the nginx package\n\nVagrant was used for building nginx with the latest pcre (8.33 at time of writing)\n\n```\n# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\n# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!\nVAGRANTFILE_API_VERSION = \"2\"\n\nVagrant.configure(VAGRANTFILE_API_VERSION) do |config|\n  config.vm.box = \"ubuntu-server-10.04\"\n  config.vm.box_url = \"http://files.vagrantup.com/lucid64.box\"\n  config.vm.synced_folder \"/your/home/dir\", \"/nginx\"\nend\n```\n\nBuild script\n\n```\n#!/bin/sh\n# http://jamie.curle.io/blog/compiling-nginx-ubuntu/\n\npcre_version=8.33\nnginx_version=1.5.10\n\napt-get install -fy build-essential zlib1g-dev\n\nmkdir ~/src\ncd ~/src\n\nwget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$pcre_version.tar.gz\ntar -xzvf pcre-$pcre_version.tar.gz\ncd pcre-$pcre_version/\n./configure # /usr/local is the default so no need to prefix\nmake\nmake install\nldconfig # this is important otherwise nginx will compile but fail to load\n\ncd ~/src\nwget http://nginx.org/download/nginx-$nginx_version.tar.gz\ntar -xvzf nginx-$nginx_version.tar.gz \ncd nginx-$nginx_version\n./configure\n\nmake \nmake install\n\ncd /usr/local\nsudo tar -zcvpf /nginx/nginx-$nginx_version.tar.gz nginx/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry-community%2Fnginx-buildpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudfoundry-community%2Fnginx-buildpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry-community%2Fnginx-buildpack/lists"}