{"id":18337738,"url":"https://github.com/agarzon/nginx-config","last_synced_at":"2025-09-06T20:36:33.683Z","repository":{"id":142776500,"uuid":"74160676","full_name":"agarzon/nginx-config","owner":"agarzon","description":"Easy to understand and extend Nginx configuration template.","archived":false,"fork":false,"pushed_at":"2019-03-25T20:46:55.000Z","size":24,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T05:35:37.301Z","etag":null,"topics":["boilerplate","nginx","template"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agarzon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-11-18T19:38:28.000Z","updated_at":"2022-07-01T11:09:38.000Z","dependencies_parsed_at":"2023-04-27T00:04:49.017Z","dependency_job_id":null,"html_url":"https://github.com/agarzon/nginx-config","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agarzon/nginx-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agarzon%2Fnginx-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agarzon%2Fnginx-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agarzon%2Fnginx-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agarzon%2Fnginx-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agarzon","download_url":"https://codeload.github.com/agarzon/nginx-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agarzon%2Fnginx-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273960086,"owners_count":25198330,"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-06T02:00:13.247Z","response_time":2576,"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":["boilerplate","nginx","template"],"created_at":"2024-11-05T20:12:09.774Z","updated_at":"2025-09-06T20:36:33.660Z","avatar_url":"https://github.com/agarzon.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nginx Configuration Template\n\nEasy to understand and extend Nginx configuration template\n\n## Features\n * GZIP compression support\n * PHP handling support\n * Cache for static files\n * SSL support with http2\n * Stronger cypher. SSL rating A+.\n * It never will replace any built-in configuration. Upgrading your Nginx will be always safe.\n\n## Installation\nJust put the code in your **/etc/nginx**\n\n## Usage\nTo create a site, add a file with extension **.conf** in **sites-enabled/** folder. Example:\n\n**/etc/nginx/sites-enabled/example.conf**\n\n```nginx\n# Force HTTPS\n{\n    server_name     mywebsite.com;\n    return          301 https://$server_name$request_uri;\n}\n\nserver\n{\n    server_name     mywebsite.com;\n    root            /var/www/$server_name/;\n\n    listen          443 ssl http2;\n    ssl_certificate /etc/nginx/ssl/nginx.crt;\n    ssl_certificate_key /etc/nginx/ssl/nginx.key;\n\n    access_log /var/log/nginx/mywebsite.com.log combined buffer=10k flush=1m;\n    error_log /var/log/nginx/mywebsite.com.error.log error;\n\n    set $APPLICATION_ENV production;\n\n    include templates/default.conf;\n    include templates/php.conf;\n    #include templates/no-php.conf;\n    #include templates/limits.conf;\n    include templates/gzip.conf;\n    include templates/static-cache.conf;\n    include templates/ssl.conf;\n}\n\n```\n\n## Create the Self-Signed SSL Certificate\n```\nsudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt\n```\n\nAnd complete the prompt:\n```\nCountry Name (2 letter code) [XX]:CA\nState or Province Name (full name):Quebec\nLocality Name (eg, city) [Default City]:Montreal\nOrganization Name (eg, company) [Default Company Ltd]:ACME\nOrganizational Unit Name (eg, section) []:\nCommon Name (eg, your name or your server's hostname) []:*.domain.com\nEmail Address []:\n```\n\n## Generate a dhparam key for stronger security\n```\nopenssl dhparam -out /etc/nginx/ssl/dhparams.pem 2048\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagarzon%2Fnginx-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagarzon%2Fnginx-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagarzon%2Fnginx-config/lists"}