Captive Portal and CSS Framework

  • Hi,

    I would like to use a CSS Framework for the Captive Portal Page, I tried to upload the framework to

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

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

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

  • Rebel Alliance Developer Netgate

    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.

  • 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)

  • Rebel Alliance Developer Netgate

    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.

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

  • Rebel Alliance Developer Netgate

    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)