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. Feat: Make it possible to override the index document

Feat: Make it possible to override the index document

Scheduled Pinned Locked Moved Solved Surfer
5 Posts 2 Posters 1.2k Views 2 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.
  • fbartelsF Offline
    fbartelsF Offline
    fbartels
    App Dev
    wrote on last edited by fbartels
    #1

    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.

    nebulonN 1 Reply Last reply
    1
    • fbartelsF 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.

      nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      @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.

      fbartelsF 1 Reply Last reply
      2
      • nebulonN nebulon

        @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.

        fbartelsF Offline
        fbartelsF Offline
        fbartels
        App Dev
        wrote on last edited by
        #3

        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.

        nebulonN 1 Reply Last reply
        0
        • fbartelsF fbartels

          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.

          nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #4

          @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.

          fbartelsF 1 Reply Last reply
          0
          • nebulonN nebulon

            @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.

            fbartelsF Offline
            fbartelsF Offline
            fbartels
            App Dev
            wrote on last edited by
            #5

            @nebulon thanks. works like a charm 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