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. Surfer
  3. What does it take to use Surfer as a “real” multidomain surfer?

What does it take to use Surfer as a “real” multidomain surfer?

Scheduled Pinned Locked Moved Surfer
19 Posts 9 Posters 657 Views 8 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.
  • nebulonN nebulon

    @luckow what is the main issue to not install distinct surfer apps for each domain, if they serve up different content anyways? the surfer app container should be very low on memory usage, disk images are anyways shared and cpu wise it also wouldn't register for low-traffic.

    Is this maybe a UI issue where it gets confusing in the dashboard or login wise into 10s of surfer instances?

    luckowL Offline
    luckowL Offline
    luckow
    translator
    wrote on last edited by
    #8

    @nebulon Thank you for your question. I spent a moment thinking about my “true motivation”. In the end, it's more of a UI issue. 10 applications for lame static web pages. Some of them with only one html file. As for resources, I'm totally with @humptydumpty. Lol.
    But I feel a bit stressed when I see 10 apps that mean nothing to me. They only exist because of that one html file. They interfere with my daily life as an admin on one Cloudron instance.
    On another Cloudron instance I have only one tile: LAMP called multisite and that feels more comfortable.

    Pronouns: he/him | Primary language: German

    andreasduerenA 1 Reply Last reply
    1
    • luckowL luckow

      @nebulon Thank you for your question. I spent a moment thinking about my “true motivation”. In the end, it's more of a UI issue. 10 applications for lame static web pages. Some of them with only one html file. As for resources, I'm totally with @humptydumpty. Lol.
      But I feel a bit stressed when I see 10 apps that mean nothing to me. They only exist because of that one html file. They interfere with my daily life as an admin on one Cloudron instance.
      On another Cloudron instance I have only one tile: LAMP called multisite and that feels more comfortable.

      andreasduerenA Offline
      andreasduerenA Offline
      andreasdueren
      wrote on last edited by
      #9

      @luckow said in What does it take to use Surfer as a “real” multidomain surfer?:

      In the end, it's more of a UI issue

      Second this. One surfer instance for these things is just much easier to monitor too.

      1 Reply Last reply
      1
      • jamesJ Offline
        jamesJ Offline
        james
        Staff
        wrote on last edited by
        #10

        So an order and folder function for app elements in the dashboard would be the feature request I guess.
        Having the ability to stuff "background" apps like Synapse, Valheim or TeamSpeak into a folder and forget about it.
        Same with the 10x Surfer problem. All into a folder. Out of sight, out of mind.

        luckowL humptydumptyH timconsidineT 3 Replies Last reply
        2
        • jamesJ james

          So an order and folder function for app elements in the dashboard would be the feature request I guess.
          Having the ability to stuff "background" apps like Synapse, Valheim or TeamSpeak into a folder and forget about it.
          Same with the 10x Surfer problem. All into a folder. Out of sight, out of mind.

          luckowL Offline
          luckowL Offline
          luckow
          translator
          wrote on last edited by
          #11

          @james said in What does it take to use Surfer as a “real” multidomain surfer?:

          Out of sight, out of mind.

          😳

          Pronouns: he/him | Primary language: German

          1 Reply Last reply
          2
          • jamesJ james

            So an order and folder function for app elements in the dashboard would be the feature request I guess.
            Having the ability to stuff "background" apps like Synapse, Valheim or TeamSpeak into a folder and forget about it.
            Same with the 10x Surfer problem. All into a folder. Out of sight, out of mind.

            humptydumptyH Offline
            humptydumptyH Offline
            humptydumpty
            wrote on last edited by humptydumpty
            #12

            @james Maybe this could be useful resource wise too. IDK if it works this way, perhaps a dev can explain but if each surfer app idles at +50MB. Would stacking all the sites on a single surfer app bring down the overall RAM usage? For example, 50 MB RAM x 10 surfer apps = 500 MB vs. having them stacked in a single surfer app that would have 50MB RAM usage only. Food for thought. If it's the latter, then any cheap hosting plan could work for basic sites/businesses.

            1 Reply Last reply
            1
            • jamesJ james

              So an order and folder function for app elements in the dashboard would be the feature request I guess.
              Having the ability to stuff "background" apps like Synapse, Valheim or TeamSpeak into a folder and forget about it.
              Same with the 10x Surfer problem. All into a folder. Out of sight, out of mind.

              timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by
              #13

              @james said in What does it take to use Surfer as a “real” multidomain surfer?:

              folder function for app elements in the dashboard

              Hey, now you're on to something.
              Folders would be great and serving multiple needs
              For me personally the dashboard filter doesn't really hit the mark.
              Yes, it does work, so no complaints.

              But having a folder which I could put all apps for a domain, now that would really help overcome "can't see wood for trees" syndrome. I have 130 apps deployed.

              In some cases I might want to group apps by ephemeral criteria not available in dashboard filters, such as "fringe".
              Tags go some way to this, but a folder would be neat.

              1 Reply Last reply
              4
              • nebulonN nebulon referenced this topic
              • rosanoR Offline
                rosanoR Offline
                rosano
                wrote last edited by
                #14

                I just worked on a hack for this https://github.com/rosano/remit

                It's a small separate app that maps multiple domains to folders under any public URL: so if it gets a request for your-site-domain.com/path, it will fetch https://your-surfer-cloudron-domain.com/maybe_a_folder_with_some_websites/your-site-domain.com/path and send it as a response. So you name folders with the domain and it figures out the rest.

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote last edited by
                  #15

                  I think what you really want here is a location rewriting reverse proxy. Maybe apache mod_rewrite using the lamp app would work here. Given the generic nature of (sub)domains mapping to paths, I guess in the end everything ends up as a hack unless there is a proper regular expression syntax supported.

                  (a propery reverse proxy is required as unlike that remit hack, you also need to handle all HTTP verbs like POST, PUT,.... as well as dealing at least with header and status code forwarding)

                  rosanoR 1 Reply Last reply
                  0
                  • nebulonN nebulon

                    I think what you really want here is a location rewriting reverse proxy. Maybe apache mod_rewrite using the lamp app would work here. Given the generic nature of (sub)domains mapping to paths, I guess in the end everything ends up as a hack unless there is a proper regular expression syntax supported.

                    (a propery reverse proxy is required as unlike that remit hack, you also need to handle all HTTP verbs like POST, PUT,.... as well as dealing at least with header and status code forwarding)

                    rosanoR Offline
                    rosanoR Offline
                    rosano
                    wrote last edited by
                    #16

                    @nebulon Agreed. I just use the tools I understand, so it tends to end up with this shape. For me static sites only require GET anyway. I copied headers in the previous version, maybe will add that later. Pull requests welcome if someone wants to improve it.

                    1 Reply Last reply
                    0
                    • robiR Offline
                      robiR Offline
                      robi
                      wrote last edited by
                      #17

                      One could also do it in the reverse, but having your Surfer app with several sites in subfolders, then install an App Proxy for each subfolder.

                      The issue is you now have a lot of App Proxies in your dash which is just like all the Surfer apps..

                      Since we don't have better control over the Cloudron reverse proxy, having more features in the App Proxy would make sense.

                      @nebulon what do you think about bringing it into the Services section of Cloudron which would allow us to add an arbitrary number of proxy records all in one place?

                      Or it could filter down into the Location section of App Config with Aliases and Redirects, which could then support ports and paths.

                      Conscious tech

                      1 Reply Last reply
                      0
                      • timconsidineT Offline
                        timconsidineT Offline
                        timconsidine
                        App Dev
                        wrote last edited by timconsidine
                        #18

                        I think it is possible to write a simple nodejs app which handles the proxy.
                        One surfer instance, one nodejs app in it started on launch, multiple folders/sites.

                        1 Reply Last reply
                        0
                        • robiR Offline
                          robiR Offline
                          robi
                          wrote last edited by
                          #19

                          Not sure you even need that, as I recall writing some JS for a list of redirects based on the incoming request which could send you anywhere else as part of the index.html on a Surfer App.

                          The main issue I think was URL cloaking so the address bar doesn't change, while the content of the page does.

                          Conscious tech

                          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