Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Feature Requests
  3. Domain Aliases

Domain Aliases

Scheduled Pinned Locked Moved Solved Feature Requests
aliasesdomainsmail
52 Posts 7 Posters 7.6k Views 9 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • girishG girish

    @lonk I guess another section named "Alias" would be a good start (just like Redirections).

    Is the multi-site WP app already available somewhere? I would think that is probably the biggest showstopper here and not the UI changes itself.

    LonkleL Offline
    LonkleL Offline
    Lonkle
    wrote on last edited by Lonkle
    #22

    @girish said in Domain Aliases:

    @lonk I guess another section named "Alias" would be a good start (just like Redirections).

    Is the multi-site WP app already available somewhere? I would think that is probably the biggest showstopper here and not the UI changes itself.

    There is no "Multisite Wordpress" Version. Multisite is just a feature inside of Wordpress (I set it up on Wordpress Developer very easily). It's a flick of a switch in the Wordpress app, it converts it's database into a multi-blog / multisite DB. Once the DB is converted tho, it can't be reverted to single site.

    So, the only show stopper is the fact that another blog within a multisite uses another domain name and Wordpress itself does the routing so with Redirections, there's no way to access any other subsite in your installation because Wordpress is never given the real URL of which to route to.

    Does that make sense? That's why Domain Aliases are the only thing needed for this. I have plenty of quality of life changes I've pre-built (which are really just slight additions to the startup script to account for multiple sites so all features work for all sites but 95% of the features work out of the box rn). But without Domain Alias Support even my slight startup script updates to account for multisite (which are outlined in the multisite thread), this feature actually is the show stopper (not the UI of course, but the routing logic) since multisite literally can't work without it (there is a way to use subdirectories, but most don't choose to do that - I'm doing it temporarily while aliases aren't supported within Cloudron).

    girishG 1 Reply Last reply
    1
    • LonkleL Lonkle

      @girish said in Domain Aliases:

      @lonk I guess another section named "Alias" would be a good start (just like Redirections).

      Is the multi-site WP app already available somewhere? I would think that is probably the biggest showstopper here and not the UI changes itself.

      There is no "Multisite Wordpress" Version. Multisite is just a feature inside of Wordpress (I set it up on Wordpress Developer very easily). It's a flick of a switch in the Wordpress app, it converts it's database into a multi-blog / multisite DB. Once the DB is converted tho, it can't be reverted to single site.

      So, the only show stopper is the fact that another blog within a multisite uses another domain name and Wordpress itself does the routing so with Redirections, there's no way to access any other subsite in your installation because Wordpress is never given the real URL of which to route to.

      Does that make sense? That's why Domain Aliases are the only thing needed for this. I have plenty of quality of life changes I've pre-built (which are really just slight additions to the startup script to account for multiple sites so all features work for all sites but 95% of the features work out of the box rn). But without Domain Alias Support even my slight startup script updates to account for multisite (which are outlined in the multisite thread), this feature actually is the show stopper (not the UI of course, but the routing logic) since multisite literally can't work without it (there is a way to use subdirectories, but most don't choose to do that - I'm doing it temporarily while aliases aren't supported within Cloudron).

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #23

      @lonk I see, let me try to understand who WP multi-site works then. I thought we had to auto configure the domains in the package, maybe that's not needed.

      LonkleL 1 Reply Last reply
      0
      • girishG girish

        @lonk I see, let me try to understand who WP multi-site works then. I thought we had to auto configure the domains in the package, maybe that's not needed.

        LonkleL Offline
        LonkleL Offline
        Lonkle
        wrote on last edited by Lonkle
        #24

        @girish said in Domain Aliases:

        @lonk I see, let me try to understand who WP multi-site works then. I thought we had to auto configure the domains in the package, maybe that's not needed.

        Well, that would be out of scope of Cloudron box code. Multiple domains can be set "per site" in a multi-site Wordpress installation and are configurable / editable. Meaning, the user edits their domain and adds one when they add a new site / blog within their multisite installation. Coincidentally, in Wordpress, they're called URL Aliases (you can even give a single post its own domain if you dig deep enough in Wordpress but most use it the default way via the "Sites" tab and adding aliases to their individual sites within the installation).

        I'm currently making Cloudron for Wordpress which I'm guessing I'll add more features down the road, but right now it's only function is that it will add any domain alias additions or changes to the parent Cloudron App Container. It's a very simple plugin. Only a few lines. I'd recommend packaging it into Cloudron's Wordpress Installation like you do the SMTP plugin (but as a Must Use plugin to ensure it's always active and cannot be deactivated).

        Tbh, because the UI is technically going to be in Wordpress, we don't need any UI changes in dashboard, just an API endpoint for any given Wordpress container to add domain aliases to itself. Adding an API endpoint for a special type of domain location seems well within the scope of box.

        LonkleL 1 Reply Last reply
        0
        • LonkleL Lonkle

          @girish said in Domain Aliases:

          @lonk I see, let me try to understand who WP multi-site works then. I thought we had to auto configure the domains in the package, maybe that's not needed.

          Well, that would be out of scope of Cloudron box code. Multiple domains can be set "per site" in a multi-site Wordpress installation and are configurable / editable. Meaning, the user edits their domain and adds one when they add a new site / blog within their multisite installation. Coincidentally, in Wordpress, they're called URL Aliases (you can even give a single post its own domain if you dig deep enough in Wordpress but most use it the default way via the "Sites" tab and adding aliases to their individual sites within the installation).

          I'm currently making Cloudron for Wordpress which I'm guessing I'll add more features down the road, but right now it's only function is that it will add any domain alias additions or changes to the parent Cloudron App Container. It's a very simple plugin. Only a few lines. I'd recommend packaging it into Cloudron's Wordpress Installation like you do the SMTP plugin (but as a Must Use plugin to ensure it's always active and cannot be deactivated).

          Tbh, because the UI is technically going to be in Wordpress, we don't need any UI changes in dashboard, just an API endpoint for any given Wordpress container to add domain aliases to itself. Adding an API endpoint for a special type of domain location seems well within the scope of box.

          LonkleL Offline
          LonkleL Offline
          Lonkle
          wrote on last edited by Lonkle
          #25

          And as you can see in: https://forum.cloudron.io/topic/4219/pressbooks-ebook-publishing-based-on-wordpress-multisite?_=1610925351271

          Plugins can use Wordpress' routing features as they like, so making this one-way sync of domains from with Wordpress to Wordpress Container makes the most sense to be compatible with all plugins.

          Also, side note, I've never seen a web hosting platform that didn't make you add a "CPanel Domain Alias" and then a "Wordpress Native URL Alias" in multisite every time you added or edited a site / alias.

          It's confused quite a few people, so this also reduces complexity for users coming into multisite. Not even hosts like WP Engine have that kind of domain integration (yet, I'm sure they will as multisite just keeps getting more popular) so this would be quite a differentiator for your platform when it comes to multisite.

          1 Reply Last reply
          0
          • jimcavoliJ Offline
            jimcavoliJ Offline
            jimcavoli
            App Dev
            wrote on last edited by
            #26

            @girish The only technical requirement is that the IP gets hit with the corresponding Host header - the stumbling block is just on the reverse proxy's answer of 3xx vs proxy essentially. I think that was your understanding before, and if so, that still holds.

            As far as the note about having to add things twice, that's mostly down to still just that DNS point easier and the second add would generally be to reconfigure the underlying apache running WP (and why WP Engine et al generally require a manual step). In the cloudron case though, we can just have a wildcard server and move on since this isn't a cPanel or similar environment and we do have the reverse proxy and other features keeping the final upstream links "clean." The "traditional" model for this is a server at x.x.x.x with one or many subdomains using that x.x.x.x in their A records.

            LonkleL 2 Replies Last reply
            0
            • jimcavoliJ jimcavoli

              @girish The only technical requirement is that the IP gets hit with the corresponding Host header - the stumbling block is just on the reverse proxy's answer of 3xx vs proxy essentially. I think that was your understanding before, and if so, that still holds.

              As far as the note about having to add things twice, that's mostly down to still just that DNS point easier and the second add would generally be to reconfigure the underlying apache running WP (and why WP Engine et al generally require a manual step). In the cloudron case though, we can just have a wildcard server and move on since this isn't a cPanel or similar environment and we do have the reverse proxy and other features keeping the final upstream links "clean." The "traditional" model for this is a server at x.x.x.x with one or many subdomains using that x.x.x.x in their A records.

              LonkleL Offline
              LonkleL Offline
              Lonkle
              wrote on last edited by
              #27

              @jimcavoli So, what are you proposing we do differently then a Wordpress-based one-way sync method? We could do it the other way around.

              Or we could also just have the user configure their custom domain in both places (in Cloudron as an Location Alias, and in Wordpress as a URL Aliases - tho I don't like this option if only due to common user error).

              1 Reply Last reply
              0
              • jimcavoliJ jimcavoli

                @girish The only technical requirement is that the IP gets hit with the corresponding Host header - the stumbling block is just on the reverse proxy's answer of 3xx vs proxy essentially. I think that was your understanding before, and if so, that still holds.

                As far as the note about having to add things twice, that's mostly down to still just that DNS point easier and the second add would generally be to reconfigure the underlying apache running WP (and why WP Engine et al generally require a manual step). In the cloudron case though, we can just have a wildcard server and move on since this isn't a cPanel or similar environment and we do have the reverse proxy and other features keeping the final upstream links "clean." The "traditional" model for this is a server at x.x.x.x with one or many subdomains using that x.x.x.x in their A records.

                LonkleL Offline
                LonkleL Offline
                Lonkle
                wrote on last edited by
                #28

                @jimcavoli Or were you just explaining that having the reverse proxy send the correct domain header to the container is all that's needed to support Wordpress Multisite? If so, that's true.

                we can just have a wildcard server
                

                Wordpress Multisite supports multiple (as many as you want) top level domains, so wildcards in this scenario don't make sense to me.

                1 Reply Last reply
                0
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by girish
                  #29

                  @jimcavoli @Lonk OK, I learnt a bit more about WP multisite now and tested it on Cloudron! As you said, it's really just a matter of putting a line in the wp-config and then enabling network settings in the WP admin.

                  I think it's quite straight forward to do something like this:

                  • Add a multiDomainflag in the manifest
                  • When present, you can add additional domains in the Location section.

                  Both the above are trivial to add. In fact, the nginx configuration required for the primary domain and the alias domain is the same as well, so it's easy to generate them.

                  However, I am stuck with one thing. It seems what WP wants really is *.domain.com (though the actual full domain can be edited after adding the site). I guess this means we should add some check box like Alias all subdomains to this app ? Internally, this will setup *.domain.com as an alias. This requires us to fix the programmatic DNS backends to support '*' as the location but this should not be hard (but a bit of work testing each backend).

                  Finally, I think this approach will also work for GitLab pages! (cc @atrilahiji and @mario )

                  1 Reply Last reply
                  2
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #30

                    I have pushed an initial implementation for this now. Essentially, you can add aliases which can be a wildcard or any other domain on Cloudron. As always the DNS, cert setup etc are all automated. I have checked with WP multisite and it works well (I am sure there are possibly package tweaks we have to do further). I will test EspoCRM and GitLab pages tomorrow.

                    e3891614-24fb-4b69-8806-b5ace6187811-image.png

                    marcusquinnM LonkleL 2 Replies Last reply
                    6
                    • girishG girish

                      I have pushed an initial implementation for this now. Essentially, you can add aliases which can be a wildcard or any other domain on Cloudron. As always the DNS, cert setup etc are all automated. I have checked with WP multisite and it works well (I am sure there are possibly package tweaks we have to do further). I will test EspoCRM and GitLab pages tomorrow.

                      e3891614-24fb-4b69-8806-b5ace6187811-image.png

                      marcusquinnM Offline
                      marcusquinnM Offline
                      marcusquinn
                      wrote on last edited by
                      #31

                      @girish Cloudron simplicity - love it!

                      Web Design https://www.evergreen.je
                      Development https://brandlight.org
                      Life https://marcusquinn.com

                      girishG 1 Reply Last reply
                      2
                      • jimcavoliJ Offline
                        jimcavoliJ Offline
                        jimcavoli
                        App Dev
                        wrote on last edited by
                        #32

                        This would also enable the Dolibarr CMS to work as well well, in theory. Worth checking on that one too

                        1 Reply Last reply
                        2
                        • marcusquinnM marcusquinn

                          @girish Cloudron simplicity - love it!

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #33

                          @marcusquinn I tested with EspoCRM portals today and it works well!

                          marcusquinnM 1 Reply Last reply
                          2
                          • girishG girish

                            @marcusquinn I tested with EspoCRM portals today and it works well!

                            marcusquinnM Offline
                            marcusquinnM Offline
                            marcusquinn
                            wrote on last edited by
                            #34

                            @girish Brilliant 🙂 Espo Portals are going to be a game-changer for me, I'm looking at Espo as a rapid web-app development for business, almost can't believe I overlooked it for so long.

                            Web Design https://www.evergreen.je
                            Development https://brandlight.org
                            Life https://marcusquinn.com

                            1 Reply Last reply
                            2
                            • girishG girish

                              I have pushed an initial implementation for this now. Essentially, you can add aliases which can be a wildcard or any other domain on Cloudron. As always the DNS, cert setup etc are all automated. I have checked with WP multisite and it works well (I am sure there are possibly package tweaks we have to do further). I will test EspoCRM and GitLab pages tomorrow.

                              e3891614-24fb-4b69-8806-b5ace6187811-image.png

                              LonkleL Offline
                              LonkleL Offline
                              Lonkle
                              wrote on last edited by
                              #35

                              @girish said in Domain Aliases:

                              I have checked with WP multisite and it works well (I am sure there are possibly package tweaks we have to do further).

                              You da man! This was the big box change to make it all possible. There are some subtle Multisite changes, that I'll submit as PR to WP Developer and WP Managed. They involve:

                              1. Upgrading the databases of all subsites on on WP Update (by default, it only upgrades the primary sites database on upgrades and overlooks sub-sites which can cause conflicts) - and this requires only a few WP-CLI lines of code after a WP Update (it detects version changes and upgrades all sub-site databases right away to prevent any sites getting out of sync from the primary sub-site which automatically has it's database upgraded when needed).

                              2. The default WP-Cron script included in Cloudron's package runs every minute and disables Wordpress built-in Cron. Sub-sites need to be accounted for when disabling cron, and luckily, I wrote another WP-CLI that loops and runs the Cron Queue for each sub-site (if they exist).

                              3. (Optional) I'm writing a "Cloudron for Wordpress" Must Use plugin to make sure if a domain gets changed from within Wordpress, it adds the new domain to the list of aliases in app locations within Cloudron's Dashboard. I see you added an API endpoint for this so it'll be easy enough for me to do, though a user will have to enter in a login token or app token into the WP plugin (UNLESS you'd like to automate this on install).

                              girishG 1 Reply Last reply
                              4
                              • LonkleL Lonkle

                                @girish said in Domain Aliases:

                                I have checked with WP multisite and it works well (I am sure there are possibly package tweaks we have to do further).

                                You da man! This was the big box change to make it all possible. There are some subtle Multisite changes, that I'll submit as PR to WP Developer and WP Managed. They involve:

                                1. Upgrading the databases of all subsites on on WP Update (by default, it only upgrades the primary sites database on upgrades and overlooks sub-sites which can cause conflicts) - and this requires only a few WP-CLI lines of code after a WP Update (it detects version changes and upgrades all sub-site databases right away to prevent any sites getting out of sync from the primary sub-site which automatically has it's database upgraded when needed).

                                2. The default WP-Cron script included in Cloudron's package runs every minute and disables Wordpress built-in Cron. Sub-sites need to be accounted for when disabling cron, and luckily, I wrote another WP-CLI that loops and runs the Cron Queue for each sub-site (if they exist).

                                3. (Optional) I'm writing a "Cloudron for Wordpress" Must Use plugin to make sure if a domain gets changed from within Wordpress, it adds the new domain to the list of aliases in app locations within Cloudron's Dashboard. I see you added an API endpoint for this so it'll be easy enough for me to do, though a user will have to enter in a login token or app token into the WP plugin (UNLESS you'd like to automate this on install).

                                girishG Offline
                                girishG Offline
                                girish
                                Staff
                                wrote on last edited by
                                #36

                                @lonk Sounds great! Let me know if you need help with the WP package changes.

                                F 1 Reply Last reply
                                1
                                • girishG girish

                                  @lonk Sounds great! Let me know if you need help with the WP package changes.

                                  F Offline
                                  F Offline
                                  freetommy
                                  wrote on last edited by
                                  #37

                                  I try to set multisite wordpress.
                                  but, I can't see aliases/location at wordpress app.
                                  how or when can I set aliases ?
                                  Thanks you very much !

                                  mehdiM girishG 2 Replies Last reply
                                  0
                                  • F freetommy

                                    I try to set multisite wordpress.
                                    but, I can't see aliases/location at wordpress app.
                                    how or when can I set aliases ?
                                    Thanks you very much !

                                    mehdiM Offline
                                    mehdiM Offline
                                    mehdi
                                    App Dev
                                    wrote on last edited by
                                    #38

                                    @freetommy What version is your cloudron ? You must have 6.1.x to be able to use multisite I think

                                    1 Reply Last reply
                                    1
                                    • F freetommy

                                      I try to set multisite wordpress.
                                      but, I can't see aliases/location at wordpress app.
                                      how or when can I set aliases ?
                                      Thanks you very much !

                                      girishG Offline
                                      girishG Offline
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #39

                                      @freetommy @mehdi While 6.1 adds aliases support, I haven't fixed up the WordPress package yet to have the multiDomain flag. I was waiting for a PR from @Lonk but I think I will go ahead and look into it today 🙂

                                      1 Reply Last reply
                                      3
                                      • girishG Offline
                                        girishG Offline
                                        girish
                                        Staff
                                        wrote on last edited by
                                        #40

                                        The multiste changes are ready. However, I can only publish the app next week. This week there is already an update on WP developer edition pending (the mail plugin was replaced).

                                        Initial docs are at https://docs.cloudron.io/apps/wordpress-developer/#multisite . There is also a CLI tool to convert a site to multisite (just adding that to the docs).

                                        LonkleL 1 Reply Last reply
                                        3
                                        • girishG girish

                                          The multiste changes are ready. However, I can only publish the app next week. This week there is already an update on WP developer edition pending (the mail plugin was replaced).

                                          Initial docs are at https://docs.cloudron.io/apps/wordpress-developer/#multisite . There is also a CLI tool to convert a site to multisite (just adding that to the docs).

                                          LonkleL Offline
                                          LonkleL Offline
                                          Lonkle
                                          wrote on last edited by
                                          #41

                                          @girish said in Domain Aliases:

                                          The multiste changes are ready. However, I can only publish the app next week. This week there is already an update on WP developer edition pending (the mail plugin was replaced).

                                          Initial docs are at https://docs.cloudron.io/apps/wordpress-developer/#multisite . There is also a CLI tool to convert a site to multisite (just adding that to the docs).

                                          Perfect! As soon as you release this, I'll get to work testing and integrating my multisite quality of life package adjustments and will do a PR for you after I'm finished testing and am satisfied it is ready for production.

                                          PS. I've been frequenting this forum less this year than in fall - was there progress with @MooCloud_Matt in regards to repackaging Wordpress for Cloudron using a more efficient stack?

                                          girishG 1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search