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

    Custom page : nginx error

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 2 Posters 1.6k 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.
    • G
      ghislain
      last edited by

      Hello i import my captive portal custom page from pf 2.1 to my new 2.3 and i have this error when i press view (current Portal page)

      nginx: 2017/04/20 11:36:53 [error] 43923#100286: *422 open() "/usr/local/www/captiveportal-inputImgIdentifiant.png" failed (2: No such file or directory), client: 172.17.0.67, server: , request: "GET /captiveportal-inputImgIdentifiant.png HTTP/1.1", host: "172.17.2.251:4433", referrer: "https://172.17.2.251:4433/services_captiveportal.php?zone=wifi_public&act=viewhtml"

      of course it do not find my png : file manager do not put in in this directory.

      can some one help me ?

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        @ghislain:

        Hello i import my captive portal custom page from pf 2.1 to my new 2.3 and i have this error when i press view (current Portal page)

        Did you adapt it ? (you mentioned an ancient version, and somewhere in the past a new field appeared)

        @ghislain:

        nginx: 2017/04/20 11:36:53 [error] 43923#100286: *422 open() "/usr/local/www/captiveportal-inputImgIdentifiant.png" failed (2: No such file or directory), client: 172.17.0.67, server: , request: "GET /captiveportal-inputImgIdentifiant.png HTTP/1.1", host: "172.17.2.251:4433", referrer: "https://172.17.2.251:4433/services_captiveportal.php?zone=wifi_public&act=viewhtml"

        Did you upload the file "inputImgIdentifiant.png" that you have on your PC to pfSense ? (this file will be available in your scripts as "captiveportal-inputImgIdentifiant.png".

        @ghislain:

        of course it do not find my png : file manager do not put in in this directory.

        YOU have to put it there using the filemanager.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • G
          ghislain
          last edited by

          I do not use backup/restore module

          I use filemanager to upload my png and css.

          and push my html index.

          it work for the html index page but not find css, png background: file manager do not put it on /usr/local/www/ but in /var/db/cpelements

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by

            @ghislain:

            it work for the html index page but not find css, png background: file manager do not put it on /usr/local/www/ but in /var/db/cpelements

            Why are you looking in /var/local/www/ ? That this the home dir for the GUI.
            The one for the captive portal is here : /usr/local/captiveportal (you should know that nginx is running with one instance for the GUI, and another for the Captive portal and yet another one if you have the https version of the Captive portal - check out config files for nginx here : /var/etc - check files that start with nginx- )
            …. and the surprise is :
            In that directory you will find your "index.php" and soft links to the files you upload with the file manager.
            Like (my setup) :

            [2.3.3-RELEASE][admin@pfsense.brit-hotel-fumel.net]/usr/local/captiveportal: ls -al
            total 40
            drwxr-xr-x   2 root  wheel    512 Mar 14 09:45 .
            drwxr-xr-x  16 root  wheel    512 Apr 13 22:00 ..
            lrwxr-xr-x   1 root  wheel     39 Oct 16  2015 captiveportal-bg.jpg -> /var/db/cpelements/captiveportal-bg.jpg
            lrwxr-xr-x   1 root  wheel     59 Jan 29  2015 captiveportal-logo_brit_hotel_relief.jpg -> /var/db/cpelements/captiveportal-logo_brit_hotel_relief.jpg
            lrwxr-xr-x   1 root  wheel     42 Jan 29  2015 captiveportal-style.css -> /var/db/cpelements/captiveportal-style.css
            -rw-r--r--   1 root  wheel  11603 Feb 11 14:50 index.php
            -rw-r--r--   1 root  wheel  10434 Feb 11 14:50 radius_accounting.inc
            -rw-r--r--   1 root  wheel   6862 Feb 11 14:50 radius_authentication.inc
            

            So, the files used by my index.php -  captiveportal-bg.jpg - captiveportal-logo_brit_hotel_relief.jpg - captiveportal-style.css are perfectly well readable.

            This is how it works for years now - still don't know why it doesn't for you.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

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