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. Support
  3. Hosting many domains

Hosting many domains

Scheduled Pinned Locked Moved Solved Support
domainsnginxhttps
11 Posts 4 Posters 3.9k Views 4 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.
    • timmmmyboyT Offline
      timmmmyboyT Offline
      timmmmyboy
      wrote on last edited by
      #2

      You can have any number of domains, here is information on adding them https://cloudron.io/documentation/domains/. Once a domain is configured it becomes an optional location when installing an app. Let's Encrypt is setup automatically when you install an app in Cloudron.

      R 1 Reply Last reply
      0
      • timmmmyboyT timmmmyboy

        You can have any number of domains, here is information on adding them https://cloudron.io/documentation/domains/. Once a domain is configured it becomes an optional location when installing an app. Let's Encrypt is setup automatically when you install an app in Cloudron.

        R Offline
        R Offline
        rockets
        wrote on last edited by rockets
        #3

        Thanks, adding the domains turned out to be straight-forward.

        Enabling a web service is getting me in trouble. I've tried both the LAMP and Surfer apps; if I simply use the registered domain, e.g., "foosite.tld" and I already have A, MX, and other records for that domain, then installation results in app status as "Error" (below domain name ion app icon of Your Apps). Hovering over "Error" shows "DNS record already exists", and clicking on it gives a pop-up:

        Error for foosite.tld
        
        The DNS record for this location already exists. Manually remove the DNS record and then click on repair.
        

        [Late update] I'm working through this part.... It seems the solution is use "www" as the subdomain and do something later with .htaccess, although this might not be completely necessary.

        R 1 Reply Last reply
        0
        • R rockets

          Thanks, adding the domains turned out to be straight-forward.

          Enabling a web service is getting me in trouble. I've tried both the LAMP and Surfer apps; if I simply use the registered domain, e.g., "foosite.tld" and I already have A, MX, and other records for that domain, then installation results in app status as "Error" (below domain name ion app icon of Your Apps). Hovering over "Error" shows "DNS record already exists", and clicking on it gives a pop-up:

          Error for foosite.tld
          
          The DNS record for this location already exists. Manually remove the DNS record and then click on repair.
          

          [Late update] I'm working through this part.... It seems the solution is use "www" as the subdomain and do something later with .htaccess, although this might not be completely necessary.

          R Offline
          R Offline
          rockets
          wrote on last edited by
          #4

          I now have the LAMP app running on subdomain "www" of "domain1.com". I've added my version of the redirect shown at the bottom of the "Apps" page in the Knowledge Base. That is, in ".htaccess", I have

          redirect 301 / https://domain1.com/
          

          I have added the second domain, "domain2.com". So far, I have not found a way to add content for it.

          Peering though the web terminal, which drops me into "/app/data", I can go down to "public" and see the content I added for the first website. Is there a way to enable a second path for the second domain?

          To make matters stranger, I decided to try "https://www.domain2.com". This took me to the login page for "https://my.domain1.com".

          1 Reply Last reply
          0
          • M Offline
            M Offline
            msbt
            App Dev
            wrote on last edited by
            #5

            If I understand you correctly, you need to install another app for (www.)domain2.com, you can't use the same LAMP for multiple domains. The forward to my.domain1.com probably happens becase the DNS records point to the cloudron IP.

            R 1 Reply Last reply
            0
            • nebulonN Away
              nebulonN Away
              nebulon
              Staff
              wrote on last edited by
              #6

              As @msbt suggests, currently two apps are required with one being simply an alias app. You can read more about this at https://cloudron.io/documentation/apps/#redirecting-www-domain

              The upstream issue to solve this for good is https://git.cloudron.io/cloudron/box/issues/133

              1 Reply Last reply
              0
              • M msbt

                If I understand you correctly, you need to install another app for (www.)domain2.com, you can't use the same LAMP for multiple domains. The forward to my.domain1.com probably happens becase the DNS records point to the cloudron IP.

                R Offline
                R Offline
                rockets
                wrote on last edited by rockets
                #7

                @msbt So if I understand correctly, although I have one virtual server, I will need a separate IP address for each domain name.

                To all:
                Just to recap, I had a multi-site nginx config handling several domain names on the same virtual server, with single IP address. The wrinkle that caused me/us to come to Cloudron was the pain of setting up a secure mail server; I was recommended here by another Cloudron user.

                It has been suggested to me as a fallback that I restore the multi-site nginx config, and put the mail server that I need in a separate Cloudron (or on my friend's Cloudron). This sounds like I need:

                A       domain1.com             IP1
                A       domain2.com             IP1
                ...
                A       domainN.com             IP1
                A       www.domain1.com         IP1
                A       www.domain2.com         IP1
                ...
                A       www.domainN.com         IP1
                A       my.domain1.com          IP2
                A       my.domain2.com          IP2
                MX      domain1.com             IP2
                MX      domain2.com             IP2
                

                Currently, I have 6 domains, mostly with independent content. Only one of these needs mail now, but I anticipate another needing it in a few months.

                In fact, can Cloudron handle mail for multiple domain names on a single server?

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  msbt
                  App Dev
                  wrote on last edited by
                  #8

                  @rockets no no, you can host all domains on a single ip address. You have to add the domains to your cloudron and when you set up the single websites, you need to point the A records for the domain and www.domain to the cloudron ip (or just set up wildcards). After that you're able to add apps like surfer or lamp where you can host the domains (and corresponding forwards - as @nebulon mentioned, at the moment you need one forwarder for each domain from or to the www.domain, depending on which version you prefer).

                  As for the mail issue: Cloudron can easily handle multiple domains, you just need to enable it in the control panel and adjust the MX, DKIM, SPF, DMARC and PTR records for each domain.

                  1 Reply Last reply
                  0
                  • nebulonN Away
                    nebulonN Away
                    nebulon
                    Staff
                    wrote on last edited by nebulon
                    #9

                    FYI, we have started working on the redirect feature and it will be part of 3.0. This will solve the common use-case of www redirects. See https://git.cloudron.io/cloudron/box/issues/133

                    R 1 Reply Last reply
                    0
                    • nebulonN nebulon

                      FYI, we have started working on the redirect feature and it will be part of 3.0. This will solve the common use-case of www redirects. See https://git.cloudron.io/cloudron/box/issues/133

                      R Offline
                      R Offline
                      rockets
                      wrote on last edited by
                      #10

                      @nebulon This is related somehow to Stripe? Link went to Stripe login page.

                      1 Reply Last reply
                      0
                      • nebulonN Away
                        nebulonN Away
                        nebulon
                        Staff
                        wrote on last edited by
                        #11

                        Oh I pasted the wrong link apparently, fixed it now.

                        1 Reply Last reply
                        0
                        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