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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Feat: Make it possible to override the index document

    Surfer
    2
    5
    301
    Loading More Posts
    • 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.
    • fbartels
      fbartels App Dev last edited by fbartels

      Hi,

      currently surfer has the ability to serve either index.html oder index.htm as its default file visiting the domain where surfer is installed.

      What we want to do is to provide an install script (which should be served as text/plain or maybe rather application/x-shellscript) on one of my Cloudron domains so users can simply do a:

      wget https://setup.domain.com
      bash index.sh
      

      edit: the file should be displayed in plain so application/x-shellscript would not be the desired behaviour actually.

      nebulon 1 Reply Last reply Reply Quote 1
      • nebulon
        nebulon Staff @fbartels last edited by

        @fbartels I do wonder if serving up any index.* with giving htm(l) precendence would be fine. It might be a bit magic, but I generally like to keep config options for surfer only where really necessary.

        But yes otherwise I guess a simple config just containing the wanted index filename can also be added easily.

        fbartels 1 Reply Last reply Reply Quote 2
        • fbartels
          fbartels App Dev @nebulon last edited by

          Hi @nebulon,

          that sounds like a nice and simple solution.

          Primarily we want that users see the contents of the script when navigating to https://setup.domain.com, so with the above tweak we can just store the script as index.txt and instruct them to do curl https://setup.domain.com > script.sh.

          So that would be covered by your solution.

          nebulon 1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff @fbartels last edited by

            @fbartels I've decided against the magic and just added a new setting to specify the index document name. A new package is made so you can test it after update.

            fbartels 1 Reply Last reply Reply Quote 0
            • fbartels
              fbartels App Dev @nebulon last edited by

              @nebulon thanks. works like a charm now.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB