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

    [Solved] Modify nginx file

    Scheduled Pinned Locked Moved Captive Portal
    6 Posts 3 Posters 1.3k 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.
    • M
      Martin Alegre
      last edited by

      Hello everyone!

      I tried to modify an captive portal's nginx file and after a reboot of the device or the service, the file comes back to previous configuration. Any idea of why this happen? or How to modify a file in pfsense through the CLI interface?

      Thanks in advance

      Regards

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        You cannot do this. Any modifications needs to go to the PHP code that generates the configuration.

        https://github.com/pfsense/pfsense/blob/master/src/etc/inc/captiveportal.inc#L420
        https://github.com/pfsense/pfsense/blob/master/src/etc/inc/system.inc#L1366

        1 Reply Last reply Reply Quote 0
        • M
          Martin Alegre
          last edited by

          Hi!

          Oh, so that was the matter… Great, I'll try to take a look on those files
          Thank you a lot

          Regards  :)

          1 Reply Last reply Reply Quote 0
          • H
            heper
            last edited by

            don't know what you are trying todo, but you can just upload new html 'templates' through the GUI …

            1 Reply Last reply Reply Quote 0
            • M
              Martin Alegre
              last edited by

              @heper:

              don't know what you are trying todo, but you can just upload new html 'templates' through the GUI …

              Hello heper,

              the problem I have is that, on my pfSense server I've configured almost 10 captive portal zones. So beyond number 8, captive portal service didn't start. After reading nginx config files I saw that 2 of them were listening on the same port, I've tried to change it manually but the server doesn't consider this kind of modifications.

              This is why I've opened this topic

              Regards

              1 Reply Last reply Reply Quote 0
              • H
                heper
                last edited by

                @jalegre:

                @heper:

                don't know what you are trying todo, but you can just upload new html 'templates' through the GUI …

                Hello heper,

                the problem I have is that, on my pfSense server I've configured almost 10 captive portal zones. So beyond number 8, captive portal service didn't start. After reading nginx config files I saw that 2 of them were listening on the same port, I've tried to change it manually but the server doesn't consider this kind of modifications.

                This is why I've opened this topic

                Regards

                this sounds like a bug. if it is, please report it on redmine.pfsense.org & explain the error & fix

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