{"id":16589482,"url":"https://github.com/rnons/nginx-in-nix-shell-issue","last_synced_at":"2026-03-10T13:03:25.574Z","repository":{"id":142888271,"uuid":"197522742","full_name":"rnons/nginx-in-nix-shell-issue","owner":"rnons","description":"Fix by pin to 19.03 HEAD","archived":false,"fork":false,"pushed_at":"2019-07-20T13:40:43.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T11:31:18.238Z","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/rnons.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":"2019-07-18T06:09:41.000Z","updated_at":"2019-07-20T13:41:21.000Z","dependencies_parsed_at":"2023-04-29T00:17:50.119Z","dependency_job_id":null,"html_url":"https://github.com/rnons/nginx-in-nix-shell-issue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rnons/nginx-in-nix-shell-issue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fnginx-in-nix-shell-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fnginx-in-nix-shell-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fnginx-in-nix-shell-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fnginx-in-nix-shell-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnons","download_url":"https://codeload.github.com/rnons/nginx-in-nix-shell-issue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnons%2Fnginx-in-nix-shell-issue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30334412,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"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":[],"created_at":"2024-10-11T23:08:58.956Z","updated_at":"2026-03-10T13:03:25.569Z","avatar_url":"https://github.com/rnons.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"I have a `nginx.conf` that looks like this\n\n```\n    server {\n        listen 3000;\n        server_name ~^(?\u003csub\u003e.+)\\.localhost$;\n        root www/$sub;\n    }\n```\n\nAnd `www/hello/index.html` contains only `hello world` text.\n\nThe idea is `http://hello.localhost` will be served from `www/hello` directory. Using system-wide nginx works fine, however, when I run nginx in nix-shell, I get 500 error without any more error message.\n\n## run nginx in nix-shell\n\n```\nnix-shell -p nginx --run \"nginx -p . -c nginx.conf\"\n# or\nnix-shell -I nixpkgs=http://github.com/NixOS/nixpkgs/archive/e199c174c69f196301de2ad2d5d87c76a822a558.tar.gz -p nginx --run \"nginx -p . -c nginx.conf\"\n```\n\n```\n% curl hello.localhost:3000\n\n\u003chtml\u003e\n\u003chead\u003e\u003ctitle\u003e500 Internal Server Error\u003c/title\u003e\u003c/head\u003e\n\u003cbody\u003e\n\u003ccenter\u003e\u003ch1\u003e500 Internal Server Error\u003c/h1\u003e\u003c/center\u003e\n\u003chr\u003e\u003ccenter\u003enginx/1.16.0\u003c/center\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## run system wide nginx\n\n```\nsudo nginx -p . -c nginx.conf\n```\n\n```\n% curl hello.localhost:3000\n\nhello world\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnons%2Fnginx-in-nix-shell-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnons%2Fnginx-in-nix-shell-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnons%2Fnginx-in-nix-shell-issue/lists"}