{"id":23359842,"url":"https://github.com/firehed/ansible-nginx-vhost","last_synced_at":"2025-04-07T20:47:12.143Z","repository":{"id":138434578,"uuid":"45272272","full_name":"Firehed/ansible-nginx-vhost","owner":"Firehed","description":"Ansible role: Configure a Virtual Host in Nginx","archived":false,"fork":false,"pushed_at":"2015-10-30T23:28:10.000Z","size":108,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-13T22:27:05.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/Firehed.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}},"created_at":"2015-10-30T19:27:45.000Z","updated_at":"2020-07-28T00:13:04.000Z","dependencies_parsed_at":"2023-03-13T15:32:24.956Z","dependency_job_id":null,"html_url":"https://github.com/Firehed/ansible-nginx-vhost","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fansible-nginx-vhost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fansible-nginx-vhost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fansible-nginx-vhost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fansible-nginx-vhost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Firehed","download_url":"https://codeload.github.com/Firehed/ansible-nginx-vhost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247729483,"owners_count":20986392,"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":[],"created_at":"2024-12-21T11:12:06.832Z","updated_at":"2025-04-07T20:47:11.579Z","avatar_url":"https://github.com/Firehed.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Nginx Vhost\n=========\n\nConfigures a single virtual host for nginx\n\nRequirements\n------------\n\nNginx should be installed on the system already (this can be done with the `Firehed.nginx` role)\n\nRole Variables\n--------------\n\nRequired:\n\n    vhost_index: index.php\n    vhost_root: /var/www/example.com\n    vhost_name: example.com\n\nOptional:\n\n    vhost_alt_names: www.example.com www2.example.com\n    vhost_fastcgi_params:\n      SOME: value\n      SOME_OTHER: value\n    vhost_fastcgi_pass: 127.0.0.1:9000\n    vhost_process_http: yes\n    vhost_redirect_http: no\n    \n\t# defaults to empty dictionary\n    vhost_ssl:\n      certificate: /path/to/public_key.pem\n      private_key: /path/to/private_key.pem\n      dhparam: /path/to/dhparam.pem (optional)\n      hsts: 1576800 (optional, HSTS header lifetime duration in seconds)\n      \nDependencies\n------------\n\nThe `Firehed.nginx` role is highly recommended, as it installs and configures Nginx itself. However it's not listed as an explicit dependency as the two can run independently.\n\nExample Playbook\n----------------\n\n**Important!** The default configuration *does not use SSL*, meaning your website *will be insecure*. The example below is secure.\n\n    - hosts: servers\n      roles:\n        - role: Firehed.nginx-vhost\n          vhost_index: index.php\n          vhost_root: /var/www/example.com\n          vhost_name: example.com\n          vhost_process_http: no\n          vhost_redirect_http: yes\n          vhost_ssl:\n            certificate: /etc/ssl/example.com/cert.pem\n            private_key: /etc/ssl/example.com/key.pem\n            dhparam: /etc/ssl/example.com/dhparam.pem\n            hsts: 1576800\n           \nRecommended; shown above: To redirect HTTP to HTTPS (301), set `vhost_redirect_http: yes` and configure the `vhost_ssl` dictionary.\n\nIdeal: To serve *only* HTTPS, set `vhost_process_http: no`, `vhost_redirect_http: no`, and configure the `vhost_ssl` dictionary. *The server will not even listen for plaintext HTTP requests!* This is not practial unless the domain is in the browser's HSTS Preload list or is an API that is only intended to be available over HTTPS.\n\n**Not recommended**: To serve HTTP and HTTPS in parallel, set `vhost_process_http: yes` (default), `vhost_redirect_http: no` (default), and configure the `vhost_ssl` dictionary.\n\n\n**Not recommended**: To serve HTTP only, do not provide a `vhost_ssl` value.\n\n\nLicense\n-------\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fansible-nginx-vhost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirehed%2Fansible-nginx-vhost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fansible-nginx-vhost/lists"}