Navigation

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

    Nginx - I don`t understand //SOLVED\\

    General pfSense Questions
    6
    10
    4938
    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.
    • Kalle13
      Kalle13 last edited by

      Hi,

      I want to get wpad support on my pfsense (2.3.2) and I am following this manual https://nguvu.org/pfsense/pfSense-2.3-WPAD-PAC-proxy-configuration-guide/
      At the point where I have to test the second nginx instance I get this output

      [2.3.2-RELEASE][admin@pfSense.localdomain]/root: /usr/local/sbin/nginx -c /usr/local/etc/nginx/nginx-wpad.conf
      nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
      nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
      nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
      nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
      nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
      nginx: [emerg] still could not bind()
      

      After a little research:

      [2.3.2-RELEASE][admin@pfSense.localdomain]/root: sockstat -l | grep :80
      root     nginx      89102 8  tcp4   *:80                  *:*
      root     nginx      89102 9  tcp6   *:80                  *:*
      root     nginx      88826 8  tcp4   *:80                  *:*
      root     nginx      88826 9  tcp6   *:80                  *:*
      root     nginx      88033 8  tcp4   *:80                  *:*
      root     nginx      88033 9  tcp6   *:80                  *:*
      
      
      [2.3.2-RELEASE][admin@pfSense.localdomain]/root: sockstat -l | grep nginx
      root     nginx      89102 6  tcp4   *:443                 *:*
      root     nginx      89102 7  tcp6   *:443                 *:*
      root     nginx      89102 8  tcp4   *:80                  *:*
      root     nginx      89102 9  tcp6   *:80                  *:*
      root     nginx      89102 10 stream /var/run/php-fpm.socket
      root     nginx      88826 6  tcp4   *:443                 *:*
      root     nginx      88826 7  tcp6   *:443                 *:*
      root     nginx      88826 8  tcp4   *:80                  *:*
      root     nginx      88826 9  tcp6   *:80                  *:*
      root     nginx      88826 10 stream /var/run/php-fpm.socket
      root     nginx      88033 6  tcp4   *:443                 *:*
      root     nginx      88033 7  tcp6   *:443                 *:*
      root     nginx      88033 8  tcp4   *:80                  *:*
      root     nginx      88033 9  tcp6   *:80                  *:*
      root     nginx      88033 10 stream /var/run/php-fpm.socket
      
      

      Why is nginx listening on port 80?
      The option for the web GUI is checked on https  ???
      I don`t understand this.
      Can anyone give me a hint, please.

      Thank you and 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 0
      • dennypage
        dennypage last edited by

        It listens on 80 to offer a redirect to 443. System / Advanced / Admin Access / WebGUI Redirect.

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

          Thank you, that worked for me!  ;D

          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 0
          • F
            fifouch last edited by

            hey i do follow same guide for setup wpad on pfsense 2.3.2 and got same error i did disable the webconfigurator redirect and i'm usings https with costume port still same error

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

              Hi,

              what does```
              sockstat -l | grep :80

              
              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 0
              • C
                christianit last edited by

                hi … i also got the same error and have followed the instructions explained before, but still experience the same thing.

                The following output results after execution of the code: sockstat -l | grep: 80

                
                [2.4.2-RELEASE][admin@pfSense.mylocal]/root: sockstat -l | grep :80             
                www      nginx      97632 7  tcp4   *:80                  *:*
                root     nginx      97523 7  tcp4   *:80                  *:*
                
                
                1 Reply Last reply Reply Quote 0
                • Gertjan
                  Gertjan last edited by

                  Just a question :
                  @christianit:

                  ….

                  www      nginx      97632 7  tcp4   *:80                  *:*
                  
                  

                  "www" ??
                  First time I see nginx running on pfSEnse with such an identity.
                  For me it's "root" everywhere.

                  No "help me" PM's please. Use the forum.

                  1 Reply Last reply Reply Quote 0
                  • C
                    christianit last edited by

                    I do not know why the "www" identity can appear other than "root".

                    and one question

                    is it correct for the "nginx" folder located in / usr / local / www relating to the nginx-dist folder in the same location? because in the case I experienced like that and does it affect?

                    thanks.

                    
                    [2.4.2-RELEASE][admin@pfSense.mylocal]/usr/local/www: ls -l
                    lrwxr-xr-x   1 root  wheel      25 Oct 23 05:36 nginx -> /usr/local/www/nginx-dist
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • Gertjan
                      Gertjan last edited by

                      @christianit:

                      
                      [2.4.2-RELEASE][admin@pfSense.mylocal]/usr/local/www: ls -l
                      lrwxr-xr-x   1 root  wheel      25 Oct 23 05:36 nginx -> /usr/local/www/nginx-dist
                      
                      

                      This isn't 'normal' at all.
                      Or, actually, it's simple. You think you have a pfSense device, but you don't. It's something else.
                      Re install completely - and I even advice you not to use the backup of the config.

                      No "help me" PM's please. Use the forum.

                      1 Reply Last reply Reply Quote 0
                      • C
                        Catwoolfii last edited by

                        The problem is in the script "check_proxy_wpad.sh". His must edit, like so:

                        #!/bin/sh
                        
                        status=$(/bin/ps -wx | /usr/bin/grep 'nginx-wpad.conf' | sed -e '/grep/d')
                        
                        if [ "$status" == "" ];then
                            /usr/local/sbin/nginx -c /usr/local/etc/nginx/nginx-wpad.conf
                        else
                            exit 0
                        fi
                        
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post