Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Captive Portal and CSS Framework

    Scheduled Pinned Locked Moved Captive Portal
    8 Posts 3 Posters 3.7k Views
    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.
    • A
      amthenia
      last edited by

      Hi,

      I would like to use a CSS Framework for the Captive Portal Page, I tried to upload the framework to
      /usr/local/captiveportal
      and
      /var/db/cpelements

      That didnt work.
      Do you have any suggestion how I could use a framework.

      1 Reply Last reply Reply Quote 0
      • C
        cmb
        last edited by

        you can manually upload files, which directory they go to I don't recall off the top of my head, check the lighty config on the CP instance.

        1 Reply Last reply Reply Quote 0
        • A
          amthenia
          last edited by

          I tried a direct upload via SCP, that didnt work. It seems pfsense does something besides renaming every file.
          I could upload every file of the framework by hand, but I cant create folders?
          I dont see how.
          It would be great if this whole captive portal document root would behave like a webserver.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            What's wrong with using Services > Captive Portal, File Manager tab? You could just rename references to the file to include the captiveportal- prefix.

            Though the document root of the CP instance should behave as a web server, there isn't anything special about the names, they're just renamed when things are done in the GUI.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • A
              amthenia
              last edited by

              The Framework has some directories with sub-directories, and lots of files. My guess is that it does something more than just rename the files, I tried to put the framework via WinSCP in the directory, that didnt work.

              I found a solution, I changed the framework to one with only two files which I put directly into the html of the captive portal site. 8)

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                In lighty-CaptivePortal.conf :

                
                server.document-root        = "/usr/local/captiveportal/"
                url.rewrite-once = ( "(.*captiveportal.*)" => "$1", "(.*)" => "/index.php?redirurl=$1" )
                
                

                So yeah things need to have "captiveportal" somewhere in their name. I forgot that bit, it needs that because otherwise it can't redirect people to the index page properly when they request some other site.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • A
                  amthenia
                  last edited by

                  Thanks!
                  I could upload the whole framework and use it, as long as I rename every file and directory?

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    Looks that way, perhaps even if just its root directory was named captiveportal-something (then it would be in every URL regardless of the end name)

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.