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

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

Scheduled Pinned Locked Moved General pfSense Questions
10 Posts 6 Posters 5.8k 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.
  • K
    Kalle13
    last edited by Aug 25, 2016, 10:59 PM Aug 24, 2016, 10:17 PM

    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
    • D
      dennypage
      last edited by Aug 24, 2016, 11:39 PM

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

      1 Reply Last reply Reply Quote 0
      • K
        Kalle13
        last edited by Aug 25, 2016, 10:57 PM

        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 Sep 19, 2016, 1:34 PM Sep 19, 2016, 1:18 PM

          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
          • K
            Kalle13
            last edited by Sep 19, 2016, 6:31 PM

            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 Feb 7, 2018, 4:16 AM

              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
              • G
                Gertjan
                last edited by Feb 7, 2018, 9:48 AM

                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, the community will thank you.
                Edit : and where are the logs ??

                1 Reply Last reply Reply Quote 0
                • C
                  christianit
                  last edited by Feb 7, 2018, 10:23 AM

                  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
                  • G
                    Gertjan
                    last edited by Feb 7, 2018, 11:15 AM

                    @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, the community will thank you.
                    Edit : and where are the logs ??

                    1 Reply Last reply Reply Quote 0
                    • C
                      Catwoolfii
                      last edited by Jun 13, 2019, 8:58 AM

                      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
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        [[user:consent.lead]]
                        [[user:consent.not_received]]