{"id":31688308,"url":"https://github.com/chengchuu/conf","last_synced_at":"2026-05-05T12:33:20.434Z","repository":{"id":63140517,"uuid":"107542252","full_name":"chengchuu/conf","owner":"chengchuu","description":"Conf provides some configurations for Linux tools, such as Nginx and Supervisor.","archived":false,"fork":false,"pushed_at":"2026-04-26T13:02:41.000Z","size":1369,"stargazers_count":1,"open_issues_count":16,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T12:34:28.427Z","etag":null,"topics":["linux","nginx","supervisor"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/chengchuu.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-10-19T12:19:38.000Z","updated_at":"2026-03-28T14:58:49.000Z","dependencies_parsed_at":"2023-02-18T22:45:58.503Z","dependency_job_id":"1a62535a-25ae-4292-af04-4ba942a39721","html_url":"https://github.com/chengchuu/conf","commit_stats":null,"previous_names":["chengchuu/conf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chengchuu/conf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengchuu%2Fconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengchuu%2Fconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengchuu%2Fconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengchuu%2Fconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chengchuu","download_url":"https://codeload.github.com/chengchuu/conf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chengchuu%2Fconf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32649572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["linux","nginx","supervisor"],"created_at":"2025-10-08T10:54:45.090Z","updated_at":"2026-05-05T12:33:20.412Z","avatar_url":"https://github.com/chengchuu.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- omit from toc --\u003e\n# conf\n\nConf provides some configurations for standard Linux tools, such as Nginx and Supervisor. It isn't easy to use the same modules in these tools, so the usage will depend on the fixed path in the system.\n\n- [Static File Type](#static-file-type)\n  - [Nginx Location](#nginx-location)\n- [Debian 11.x/12.x/13.x](#debian-11x12x13x)\n  - [Nginx](#nginx)\n  - [Supervisor](#supervisor)\n- [Ubuntu 18.x](#ubuntu-18x)\n  - [Nginx](#nginx-1)\n- [macOS](#macos)\n  - [Nginx](#nginx-2)\n- [Reference](#reference)\n\n## Static File Type\n\nAll:\n\n```plain\ngif;png;bmp;jpeg;jpg;html;htm;shtml;xml;json;mp3;wma;flv;mp4;wmv;ogg;avi;doc;docx;xls;xlsx;ppt;pptx;txt;pdf;zip;exe;tat;ico;css;js;swf;apk;m3u8;ts\n```\n\n### Nginx Location\n\nImages, Documents and Executables:\n\n```plain\nlocation ~ .*\\.(png|jpeg|jpg|gif|ico|webp|mp3|mp4|webm|wma|bmp|swf|flv|wmv|avi|apk|m3u8|doc|docx|xls|xlsx|ppt|pptx|txt|pdf|zip|exe)$ {\n    expires 30d;\n}\n```\n\nWeb Assets:\n\n```plain\nlocation ~ .*\\.(html|css|js|json|htm|shtml|xml|ts)$ {\n    expires 24h;\n}\n```\n\nAlthough there is no strict specification, the following order is a commonly accepted best practice in the industry:\n\n```plain\nlocation /example/ {\n    # 1. Path-related directives\n    root /var/www/html;\n    # or\n    alias /var/www/html/example/;\n\n    # 2. Index files\n    index index.html index.htm;\n\n    # 3. File lookup order\n    try_files $uri $uri/ /index.html;\n\n    # 4. Error handling\n    error_page 404 = @fallback;\n    error_page 500 502 503 504 /50x.html;\n\n    # 5. Caching strategy\n    expires 30d;\n    add_header Cache-Control \"public, immutable\";\n\n    # 6. Security headers\n    add_header X-Frame-Options \"SAMEORIGIN\";\n    add_header X-Content-Type-Options \"nosniff\";\n\n    # 7. Access control\n    allow 192.168.1.0/24;\n    deny all;\n\n    # 8. Logging\n    access_log /var/log/nginx/example_access.log;\n    error_log /var/log/nginx/example_error.log;\n}\n```\n\n## Debian 11.x/12.x/13.x\n\nInstall dependencies:\n\n```bash\napt update\napt upgrade -y\napt install -y git nginx supervisor golang\n```\n\nCheck:\n\n```bash\ngo version\ngit --version\n```\n\n### Nginx\n\nEdit the configuration file:\n\n```bash\nvim /etc/nginx/nginx.conf\n```\n\nStart and Enable Nginx service:\n\n```bash\nsystemctl start nginx\nsystemctl enable nginx\n# equivalent to:\n# systemctl enable --now nginx\n```\n\nRestart, Reload, Stop, Status:\n\n```bash\nsystemctl restart nginx\nsystemctl reload nginx\nsystemctl stop nginx\nsystemctl status nginx\n```\n\n### Supervisor\n\nEdit the configuration file:\n\n```bash\nvim /etc/supervisor/supervisord.conf\n```\n\nEnable Supervisor service:\n\n```bash\nsystemctl enable --now supervisor\nsystemctl status supervisor\n```\n\n## Ubuntu 18.x\n\n### Nginx\n\nEdit the configuration file:\n\n```bash\nvim /etc/nginx/nginx.conf\n```\n\nStart, Restart, Stop, Status:\n\n```bash\nservice nginx start\nservice nginx restart\nservice nginx stop\nservice nginx status\n```\n\n## macOS\n\n### Nginx\n\nEdit the configuration file:\n\n```bash\nvim /usr/local/etc/nginx/nginx.conf\n```\n\nStart:\n\n```bash\n/usr/local/bin/nginx\n```\n\nReload:\n\n```bash\nnginx -s reload\n```\n\nStop:\n\n```bash\nnginx -s stop\n```\n\nCheck the status:\n\n```bash\nnginx -t\n```\n\n## Reference\n\n1. Nginx Example: \u003chttps://nginx.org/en/docs/example.html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchengchuu%2Fconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchengchuu%2Fconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchengchuu%2Fconf/lists"}