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

Alias or Addon Domains for V4 #23

Closed
michacassola opened this issue Jun 3, 2018 · 22 comments · Fixed by EasyEngine/site-command#341
Closed

Alias or Addon Domains for V4 #23

michacassola opened this issue Jun 3, 2018 · 22 comments · Fixed by EasyEngine/site-command#341
Assignees

Comments

@michacassola
Copy link

michacassola commented Jun 3, 2018

Please add the abbility to set or update the vhost domains with EE V4:

ee site create example.com --alias example.net --alias example.org
ee site update example.com --alias example.de --alias example.tld

Thanks!

Edits from @kirtangajjar:
The following command should add alias domains and get their SSL certs:
ee site update example.com --alias example.de --alias example.tld --ssl=le

@michacassola
Copy link
Author

michacassola commented Jul 14, 2018

Hey guys, @rahul286 @kirtangajjar @mbtamuli

thanks for the Beta 3 Release!

I have one question though as I have a use case that is also supported natively in wordpress:
ee site create example.com --alias example.net --alias example.org --wpsubdom --wpredis --le
Meaning a MU install is made with subdomains being the alias domains and they would also need to be included in the letsencrypt certificate.
And later one would want to add another domain like this:
ee site update example.com --alias example.net --alias example.org --alias example.info --le
adding another alias domain with LE and a MU subsite.

Will you please support this use case in the final v4?

(As a workaround with v3 I setup empty --php sites and change the location in the vHost file and also get the LE cartificate through the empty site ( ee site create example.com --php --le ). Maybe you could use this "Method" to stay flexible with the LE certificates in this kind of setup. Setting up a different for LE only NGINX container that points to the same location as the original domains htdocs folder.)

@michacassola
Copy link
Author

It makes me a bit sad @rahul286 that you removed the v4 release tag from this issue as I need this feature to use v4 as I don't know any workaround in v4.

@rahul286
Copy link
Member

rahul286 commented Aug 9, 2018

Label release/4.x is deleted because we cleanup issue tracker to have only issues that are related to v4.

This issue is open because of its part of the scope. Although not 4.0 itself but probably 4.1 or later.

@michacassola
Copy link
Author

michacassola commented Aug 9, 2018

Thank you very much for clarifying @rahul286!

Once v4 is out, is there a possible workaround?

@michacassola
Copy link
Author

It would definitely have to be 4.1, it only makes sense in the "Development" release.

@michacassola
Copy link
Author

michacassola commented Nov 25, 2018

@rahul286 and @kirtangajjar

How do I do it manually best until we get the feature in v4.1?

Do I make a html site to get the LE autorenewal going and change the location parameter in the default.conf for the nginx-proxy service?
Or do I change the custom nginx.conf on the site level?
Or do I change the VIRTUAL_HOST parameter in the .env file of the site root, but then how do I rebuild the NGINX container with that environment variables?

Please help me so that it works and is also update resistant.

@michacassola
Copy link
Author

michacassola commented Nov 30, 2018

@kirtangajjar and @rahul286
Please move another earlier post of this to the feature-request repo and mark this one as duplicate or move this one and close the other. We should then change the title of the post so it includes all terminology in this direction.

@kirtangajjar kirtangajjar transferred this issue from EasyEngine/easyengine Nov 30, 2018
@michacassola michacassola changed the title [Feature Request] Alias Domains for V4 Alias or Addon Domains for V4 Nov 30, 2018
@mbtamuli
Copy link

@mrrobot47 I think these are the changes required.

  1. EasyEngine database update. (information for the alias domains)

  2. VIRTUAL_HOST=${VIRTUAL_HOST},${ALIAS_DOMAINS}
    VIRTUAL_HOST -> PRIMARY DOMAIN
    ALIAS_DOMAINS -> Other domains

  3. Site's nginx config(server_name)

  4. Redis config(TBD and tested)

@mbtamuli
Copy link

@mrrobot47 Please take a look at this as @sagarnasit won't be able to continue for some time.

@kirtangajjar
Copy link

kirtangajjar commented Feb 4, 2019

Proposal for syntax for alias domains:

  1. Specify aliases while creating site.
ee site create <sitename> --ssl=le --alias='<alias domains>'
ee site create a.test --ssl=le --alias='b.test,*.b.test,c.test'
  1. Add a new alias domain after the site has created.
ee site alias add <sitename> <list of alias domains>
ee site alias add a.test d.test *.d.test
  1. List alias domains of a site
ee site alias list <sitename>
ee site alias list a.test
  1. Remove alias domain of a site
ee site alias remove <sitename> <list of alias domains>
ee site alias remove a.test d.test *.d.test

In future, we can also update site list command to list the alias domains for the site. This would be useful to see all the domains pointed to the server which are handled by EE.

ee site list --aliases --format=text

@mrrobot47
Copy link
Member

Uniformity in syntax is required. While creating site, <alias domains> is passed as associative arguments, whereas in add and remove, <alias domains> is passed as positional arguments.

Also, looking at rest of the commands, delete is generally used in EasyEngine as sub-command name instead of remove. Keeping that will be more intuitive to a user.

@michacassola
Copy link
Author

michacassola commented Feb 4, 2019

I would suggest not adding an extra subcommand to site but to use update instead as users are used to it already:

To add alias:
ee site create example.com --ssl=le --alias=site1.com,*.site2.com
ee site update example.com --alias=site1.com,*.site2.com (should work with multiple update arguments)

To delete alias:
ee site update example.com --alias-del=site1.com,*.site2.com

To list all alias:
ee site info example.com Where they will simply be in an extra slot in the output list.
ee site info example.com --alias Will print only the alias.

This way we will also keep all that associative/positional arguments stuff @mrrobot47 wrote about.

Please also don't forget the --wpsubdom site creation command compatibility of --alias=... There it will also be very important for the Multisite users.

@madbradj
Copy link

Any update on this issue?

@michacassola
Copy link
Author

It's in their roadmap's to-do list https://github.com/orgs/EasyEngine/projects/4 and will be in the next bigger release.
My guess is that right now they are very busy with other things.

@puccaso
Copy link

puccaso commented May 26, 2019

ee site create example.com --alias example.net --alias example.org --wpsubdom --wpredis --le
Meaning a MU install is made with subdomains being the alias domains and they would also need to be included in the letsencrypt certificate.

We really need this!

@csaltos
Copy link

csaltos commented Aug 24, 2019

In the meantime (or if stuck using an old ee version) here is how I workaround it:

Follow the instructions at the custom nginx-proxy override configurations -> https://github.com/jwilder/nginx-proxy#custom-nginx-configuration

As a summary, simply create this file:

/opt/easyengine/services/nginx-proxy/vhost.d/site1.com

With the content:

server_name site1.com site2.com;

Then:

ee service restart nging-proxy

And you are good to go !! ;) :)

Your changes are going to persist any other restart or reload.

NOTE: the name of the vhost file should be the same as the ee site you want to override.

@UgooAgbams
Copy link

What's the status of this issue?
Has it been implemented or yet to be?

As a summary, simply create this file:

/opt/easyengine/services/nginx-proxy/vhost.d/site1.com

With the content:

server_name site1.com site2.com;

Then:

ee service restart nging-proxy

Your idea worked, but does not give one ability to install letsencrypt on those added domains.

Any alternatives?

@baitasite
Copy link

Issue is dead?

@koljasagorski
Copy link

How can I create a alias now?

@kangarooo
Copy link

kangarooo commented May 3, 2020

How to make WP multisite sertificate to work now?

@kirtangajjar
Copy link

Update on this issue: As you'll might've been aware, partial support for alias domains was added to in v4.1 release. However, it was just limited to wpsubdom site.

This will be fixed soon with EasyEngine/site-command#341. Hopefully by the next release, this feature will be implemented completely 🤞

@kirtangajjar
Copy link

Thank you all for your feedback. Alias domains feature is now available for all the site types. This was one of the most requested
and awaited features of EE, and finally, we've brought it to a close.

You'll be able to use it in alias domains in all site types from v4.1.2.

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