{"id":18006000,"url":"https://github.com/brianhicks/elm-package-nginx","last_synced_at":"2025-04-04T10:48:19.407Z","repository":{"id":138122925,"uuid":"131874730","full_name":"BrianHicks/elm-package-nginx","owner":"BrianHicks","description":"nginx config for package.elm-lang.org (sketch)","archived":false,"fork":false,"pushed_at":"2018-05-09T15:03:08.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T06:07:43.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/BrianHicks.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":"2018-05-02T16:01:38.000Z","updated_at":"2018-05-09T15:03:09.000Z","dependencies_parsed_at":"2023-03-23T17:50:32.322Z","dependency_job_id":null,"html_url":"https://github.com/BrianHicks/elm-package-nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-package-nginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-package-nginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-package-nginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-package-nginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianHicks","download_url":"https://codeload.github.com/BrianHicks/elm-package-nginx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166140,"owners_count":20894652,"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","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-10-30T00:22:50.250Z","updated_at":"2025-04-04T10:48:19.390Z","avatar_url":"https://github.com/BrianHicks.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm package nginx\n\nThis is an nginx configuration for package.elm-lang.org.\n\nRules:\n\n1. Requests which arrive with no `User-Agent` header must be served over HTTP and use the 0.18 package server (applies to 0.17 and 0.16 as well.)\n2. Requests which arrive with the `User-Agent: elm/0.19.0` header must be served over HTTPS and use the 0.19 package server.\n3. Requests from browsers must be served over HTTPS, and use the latest version of the package server.\n\n## Installing:\n\nReplace the values in the `upstream` blocks with the locations of the actual elm-package servers.\nIf you want to try things out on some non-80 test port, replace `listen 80` with `listen yourport` as well.\n\nBefore running the rest of this, copy the config to your server with `scp ngingx.conf you@yourserver:~/nginx.conf`\n\n```\n# install certbot\nsudo apt-get install software-properties-common\nsudo add-apt-repository ppa:certbot/certbot\nsudo apt-get update\nsudo apt-get install nginx python-certbot-nginx\n\n# assuming the config at `nginx.conf` is at `~/nginx.conf`\nsudo mv ~/nginx.conf /etc/nginx/sites-enabled/default\nsudo certbot --nginx --staging # for testing; if doing this \"for real\" remove --staging\n```\n\nMost of the default answers will be fine (you'll need to enter an email address, accept terms of use for the cert, and opt in or out to the EFF mailing list.)\nCertbot should find `package.elm-lang.org` and ask if you want that cert (yes.)\nWhen it asks if you want it to enable HTTPS by default, say no.\nWe're handling that ourselves using the rules above.\n\n## Developing\n\nWith Docker installed, run `./test.sh`. The test harness does not set up HTTPS, but will make sure the rules above are followed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Felm-package-nginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianhicks%2Felm-package-nginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Felm-package-nginx/lists"}