{"id":20189928,"url":"https://github.com/tjm/web-default","last_synced_at":"2025-09-04T06:36:40.561Z","repository":{"id":3838587,"uuid":"4920603","full_name":"TJM/web-default","owner":"TJM","description":"Very basic virtual hosting configuration","archived":false,"fork":false,"pushed_at":"2014-01-14T05:50:25.000Z","size":252,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-03T07:28:05.576Z","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/TJM.png","metadata":{"files":{"readme":"README-nginx.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":"2012-07-06T06:57:51.000Z","updated_at":"2014-01-14T05:50:25.000Z","dependencies_parsed_at":"2022-09-21T19:51:44.577Z","dependency_job_id":null,"html_url":"https://github.com/TJM/web-default","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TJM/web-default","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fweb-default","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fweb-default/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fweb-default/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fweb-default/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TJM","download_url":"https://codeload.github.com/TJM/web-default/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fweb-default/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273566944,"owners_count":25128629,"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-09-04T02:00:08.968Z","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":"2024-11-14T03:39:42.074Z","updated_at":"2025-09-04T06:36:40.517Z","avatar_url":"https://github.com/TJM.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"web-default\n===========\n\nVery basic virtual hosting configuration\n -- nginx edition\n\nInitial Setup\n-------------\nDefault/Global settings\n\nNOTE: ngix is assumed to be installed via the passenger-install-nginx-module utility after installing rvm and the desired version of ruby, and \"rvm use\" -ing that version\n\n* Clone git repo (or install)\n\n```bash\nmkdir /web\ncd /web\ngit clone https://github.com/TJM/web-default DEFAULT\n```\n\n* Copy Example configs\n\n```bash\ncd /web/DEFAULT/conf\nfor file in *NGINX.EXAMPLE; do\n  newfile=`basename $file .NGINX.EXAMPLE`\n  cp $file $newfile\ndone\n\n### EDIT AS NECESSARY\n```\n\n* Link Scripts\n\n```bash\nmkdir -p /root/bin \u0026\u0026 ln -s /web/DEFAULT/bin/* /root/bin/\n```    \n\n* Create conf.d and add it to the config\n * EDIT: /opt/nginx/conf/nginx.conf\n  * Add \"        include conf.d/*.conf;\" before the last \"}\"\n\n```bash\nmkdir /opt/nginx/conf/conf.d\n```\n\n* Create a DEV password (used to access dev.DOMAIN.COM)\n\n```bash\nyum install -y httpd-tools\nhtpasswd -c /web/DEFAULT/pw/dev.pw DEVUSER\n```\n\n* Insert global SSH Keys into /web/DEFAULT/conf/authorized_keys2 (these will be automatically propagated to every website)\n\n```bash\ncat \u003e\u003e /web/DEFAULT/authorized_keys2\n\t[[paste keys in]]\n\tCTRL+D\n```\n\n* Run updateAllWebConfigs\n\n```bash\nupdateAllWebConfigs\n```\n\n* Restart Nginx\nNOTE: init scripts are not installed by default\n\n```bash\nservice nginx restart\n```\n* Create a default website\n\n```bash\ntouch website/index.html\n```\n\nAdding a new host\n------------------\n```bash\nuseradd -d /web/somedomain.com -c \"somedomain.com\" somedomain\nupdateAllWebConfigs\nservice httpd restart\n```\n(TBD)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjm%2Fweb-default","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjm%2Fweb-default","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjm%2Fweb-default/lists"}