Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi domain ssl support #1173

Conversation

YevhenZvieriev
Copy link
Contributor

@YevhenZvieriev YevhenZvieriev commented Jun 10, 2024

Overview

This PR enhances the setup-ssl script to support generating SSL certificates for multiple domains. Previously, the script only handled a single domain according to #1172, which limited its utility for multi-domain setups.

Changes

  • Multiple Domain Support: The script now accepts multiple domains as arguments and generates SSL certificates for each one.
  • Certificate Verification: Added checks to ensure that certificates are created successfully before attempting to move them to the Nginx directory.
  • Automated Configuration: Automatically restarts the Nginx containers to apply the new SSL configurations.

Testing

  1. Run the script with multiple domains:
   bin/setup-ssl magento.test foo.test
  1. Verify that SSL certificates are created and moved to /etc/nginx/certs/ for each domain.

  2. Ensure the Nginx containers restart successfully and apply the new configurations.

This enhancement simplifies the setup process for projects requiring SSL for multiple domains, improving developer productivity and ensuring secure connections across all specified domains.

Before :

Screenshot from 2024-06-10 22-16-42

After:

Screenshot from 2024-06-10 22-18-40

markshust and others added 3 commits April 25, 2024 12:18
Co-authored-by: Michael Lehmkuhl <michael@electricpulp.com>
Co-authored-by: Jenyamba <is3kv3@ukr.net>
Co-authored-by: Tu Van <vandinhtuit@gmail.com>
Co-authored-by: Cid Lopes <alannettto@gmail.com>
Copy link

what-the-diff bot commented Jun 10, 2024

PR Summary

  • Introduction of Multi-Domain Certificate Generation
    The process of creating digital certificates has been improved. Now, it's possible to automatically generate certificates for more than one domain at a time, making the task more efficient and less time-consuming.

  • Implementation of Successful Generation Check
    A new check has been added to confirm whether the generation of certificates is successful. This means we are now able to identify and rectify any issues immediately. This enhances the reliability of the certificates we produce and the overall security of our operations.

  • Relocation of Key and Certificate Files
    Upon successful creation, key and certificate files have now been set to automatically move to a specified location ('/etc/nginx/certs/'). This ensures all important files are kept in a single, secure location, easy to manage and access when needed. This improvement enhances organization and aids in maintaining our system effectively.

@YevhenZvieriev
Copy link
Contributor Author

Closing in because this PR does not resolve issue #1172, with generating SSL certs for more than one domain.

Resolving was reverting back to an old commit for the bin/setup-ssl script, see comment #1172 (comment) .

So, this commit causes the #1172 issue.

@ssx
Copy link

ssx commented Jul 29, 2024

This is fixed in #1172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants