How to configure Nginx in 2.3 for WPAD



  • 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



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


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





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



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



  • My script was with error.

    :D

    Thanks!

    rlrobs



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



  • 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


Log in to reply