{"id":20894853,"url":"https://github.com/stilleshan/nginx","last_synced_at":"2025-07-19T08:04:08.652Z","repository":{"id":125820579,"uuid":"250450458","full_name":"stilleshan/nginx","owner":"stilleshan","description":"docker 快速部署 nginx 环境,适用于 HTML 页面站点,简单 Web 测试环境以及反向代理 docker 容器等需求.","archived":false,"fork":false,"pushed_at":"2021-06-18T13:54:33.000Z","size":7,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T23:36:21.606Z","etag":null,"topics":["docker-nginx","nginx","nginx-docker"],"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/stilleshan.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":"2020-03-27T05:41:55.000Z","updated_at":"2024-06-07T09:22:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0c84c89-1ffa-44ee-8cc8-de16d6c282d0","html_url":"https://github.com/stilleshan/nginx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stilleshan/nginx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilleshan%2Fnginx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilleshan%2Fnginx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilleshan%2Fnginx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilleshan%2Fnginx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stilleshan","download_url":"https://codeload.github.com/stilleshan/nginx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilleshan%2Fnginx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265904252,"owners_count":23846673,"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":["docker-nginx","nginx","nginx-docker"],"created_at":"2024-11-18T10:23:12.639Z","updated_at":"2025-07-19T08:04:08.644Z","avatar_url":"https://github.com/stilleshan.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx\ndocker 快速部署 nginx 环境,适用于 HTML 页面站点,简单 Web 测试环境以及反向代理 docker 容器等需求.\n\n## 部署\n### docker\n在 root 目录下 git clone 本仓库用来挂载相关配置文件\n```shell\ncd ~\ngit clone https://github.com/stilleshan/nginx.git\n```\n启动 nginx 容器\n```shell\ndocker run -d --name=nginx --restart=always \\\n    --network host \\\n    -v ~/nginx/conf/nginx.conf:/etc/nginx/nginx.conf \\\n    -v ~/nginx/vhost:/etc/nginx/conf.d/vhost \\\n    -v ~/nginx/ssl:/etc/nginx/ssl \\\n    -v ~/nginx/html:/usr/share/nginx/html \\\n    nginx\n```\n\n### docker compose\n```shell\ncd ~\ngit clone https://github.com/stilleshan/nginx.git\ncd nginx\ndocker-compose up -d\n```\n\n## 说明\n`~/nginx/conf` 用于存放`nginx 主配置`文件  \n\u003e conf 目录下为官方 nginx.conf 配置文件,已新增 include vhost 目录以方便挂载多站点配置文件. \n\n`~/nginx/vhost` 用于存放`各站点 conf 配置`文件  \n\u003e vhost 目录中已有常用的 conf 样本,参考修改域名和证书路径.  \n\n`~/nginx/ssl` 用于存放`证书`文件  \n\u003e ssl 目录有样本 conf 所需证书文件,如需删除请连同 conf 样本一起删除,避免 nginx 报错.\n\n`~/nginx/html` 用于存放`网页`文件  \n\u003e html 目录为站点根目录,自行创建子目录存放网页以用来部署多个站点.\n\n## 链接\n[Docker 打造支持快速部署和迁移的 Nginx 环境](https://www.ioiox.com/archives/91.html)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstilleshan%2Fnginx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstilleshan%2Fnginx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstilleshan%2Fnginx/lists"}