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

    How to configure Nginx in 2.3 for WPAD

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 4 Posters 10.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.
    • Kalle13K
      Kalle13
      last edited by

      Hey folks,

      I have an issue with the new webserver wich is nginx.
      This how to http://www.9ns.co.uk/blog/?p=116 describes how to set up pfsense for WPAD support.
      But it refers on the 2.2.6 version of pfsense which has an other webserver installed.
      The now present version 2.3 has nginx installed and I am stuck at the point where I have to configure the webserver (nginx) for the wpad.dat wpad.da proxy.pac files.

      Can someone please help my with this?

      Best
      Regards
      Kalle

      "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

      • Kinderzimmer Productions
      1 Reply Last reply Reply Quote 0
      • Kalle13K
        Kalle13
        last edited by

        ;D

        I have figured it out by myself.
        To configure nginx to serve the wpad files you have to modify this file```
        /usr/local/etc/nginx/mime.types

        and add the following lines to it
        

        application/x-ns-proxy-autoconfig    pac;
            application/x-ns-proxy-autoconfig    dat;
            application/x-ns-proxy-autoconfig    da;

        
        Now you must put the three files **proxy.pac** + **wpad.da** + **wpad.dat** in this folder
        

        /usr/local/www/nginx/

        By default (on FreeBSD), nginx defaults to looking for content in /usr/local/www/nginx/.
        
        With the how-to of this sites I am now able two to get auto configuration for my browsers throughout WPAD.
        [http://www.9ns.co.uk/blog/?p=116](http://www.9ns.co.uk/blog/?p=116)
        [https://www.cryptomonkeys.com/2014/07/automatic-http-proxy/](https://www.cryptomonkeys.com/2014/07/automatic-http-proxy/)
        
        Hope my post is not to confusing and I could help someone with the same issue. ;)
        
        Best
        Regards
        Kalle

        "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

        • Kinderzimmer Productions
        1 Reply Last reply Reply Quote 0
        • C
          chidgear
          last edited by

          Trying, I'll tell you how it went. Thanks! :D

          1 Reply Last reply Reply Quote 0
          • J
            javcasta
            last edited by

            Hello.

            http://www.javcasta.com/pfsense-2-3-wpad-con-ngnix-sin-revertir-gui-a-http/

            Regards.

            Javier Castañón
            Técnico de comunicaciones, soporte y sistemas.

            Mi web: https://javcasta.com/

            Soporte scripting/pfSense https://javcasta.com/soporte/

            1 Reply Last reply Reply Quote 0
            • R
              rlrobs
              last edited by

              Chome - ok
              IE - ok
              Firefox: It doesn't work. (dhcp and dns)
              :(

              1 Reply Last reply Reply Quote 0
              • J
                javcasta
                last edited by

                Hello

                riribs, Like a proxy.pac,  do you have  wpad.dat, wpad.da files? (with te same javascript content tha proxy.pac, and declare mime-types for .dat and .da in ngnix)

                Regards.

                Javier Castañón
                Técnico de comunicaciones, soporte y sistemas.

                Mi web: https://javcasta.com/

                Soporte scripting/pfSense https://javcasta.com/soporte/

                1 Reply Last reply Reply Quote 0
                • R
                  rlrobs
                  last edited by

                  My script was with error.

                  :D

                  Thanks!

                  rlrobs

                  1 Reply Last reply Reply Quote 0
                  • J
                    javcasta
                    last edited by

                    Ok. :)

                    I do it : Once i have the proxy.pac, for wpad.dat and wpad.da, via shell (ssh)

                    ln -s /usr/local/www/nginx-dist/proxy.pac /usr/local/www/nginx-dist/wpad.dat
                    ln -s /usr/local/www/nginx-dist/proxy.pac /usr/local/www/nginx-dist/wpad.da
                    

                    Regards.

                    Javier Castañón
                    Técnico de comunicaciones, soporte y sistemas.

                    Mi web: https://javcasta.com/

                    Soporte scripting/pfSense https://javcasta.com/soporte/

                    1 Reply Last reply Reply Quote 0
                    • Kalle13K
                      Kalle13
                      last edited by

                      Hi,

                      here is another manual for pfsense 2.3 in English.

                      pfSense 2.3 WPAD/PAC proxy configuration guide
                      https://nguvu.org/pfsense/pfSense-2.3-WPAD-PAC-proxy-configuration-guide/

                      Best regards

                      "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

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