HTTP Loopback Connections are not enabled on this server - wordpress on docker2019 Community Moderator ElectionDocker can't connect to docker daemonFrom inside of a Docker container, how do I connect to the localhost of the machine?Issue connecting to Docker containerCannot connect to postgres server in dockerDocker Rails Server Refusing Connectionsdocker nginx and php, php cant connect to localhost“Connection Refused” on Docker node containerDocker curl: (7) Failed to connect to localhost port 80: Connection refusedCan not connect to NGINX with Docker-ComposeWordpress - cURL error 7: Failed to connect to localhost port 80: Connection refused

Vocabulary for giving just numbers, not a full answer

Why is computing ridge regression with a Cholesky decomposition much quicker than using SVD?

Is compression "encryption" under FCC regs?

Good for you! in Russian

When stopping and starting a tile job, what to do with the extra thinset from previous row's cleanup?

How strictly should I take "Candidates must be local"?

Why the color red for the Republican Party

Why was Goose renamed from Chewie for the Captain Marvel film?

How do I express some one as a black person?

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?

If I receive an SOS signal, what is the proper response?

PTIJ: wiping amalek’s memory?

An alternative proof of an application of Hahn-Banach

Why would one plane in this picture not have gear down yet?

Is it necessary to separate DC power cables and data cables?

Are there historical instances of the capital of a colonising country being temporarily or permanently shifted to one of its colonies?

How to detect if C code (which needs 'extern C') is compiled in C++

What's the "normal" opposite of flautando?

Single word request: Harming the benefactor

What Happens when Passenger Refuses to Fly Boeing 737 Max?

Examples of a statistic that is not independent of sample's distribution?

Do items de-spawn in Diablo?

Bash script should only kill those instances of another script's that it has launched

Reversed Sudoku



HTTP Loopback Connections are not enabled on this server - wordpress on docker



2019 Community Moderator ElectionDocker can't connect to docker daemonFrom inside of a Docker container, how do I connect to the localhost of the machine?Issue connecting to Docker containerCannot connect to postgres server in dockerDocker Rails Server Refusing Connectionsdocker nginx and php, php cant connect to localhost“Connection Refused” on Docker node containerDocker curl: (7) Failed to connect to localhost port 80: Connection refusedCan not connect to NGINX with Docker-ComposeWordpress - cURL error 7: Failed to connect to localhost port 80: Connection refused










0















I have a wordpress official container with a dock port 80 mapped to 32795 external... when I go to administration area of wordpress I get this error:



Important: HTTP Loopback Connections are not enabled on this server. If you need to contact your web host, tell them that when PHP tries to connect back to the site at the URL http://localhost:32795/wp-admin/admin-ajax.php and it gets the error cURL error 7: Failed to connect to localhost port 32795: Connection refused. There may be a problem with the server configuration (eg local DNS problems, mod_security, etc) preventing connections from working properly.



I think the problem is that the site inside the container tries to communicate with the 32795 port instead of 80, but it can not because this door is only seen from the outside of the container...



I created a script inside the site with phpinfo, and I checked the loopback connections are on...



There is a solution for this? I have docker un windows with kitematic



thanks










share|improve this question


























    0















    I have a wordpress official container with a dock port 80 mapped to 32795 external... when I go to administration area of wordpress I get this error:



    Important: HTTP Loopback Connections are not enabled on this server. If you need to contact your web host, tell them that when PHP tries to connect back to the site at the URL http://localhost:32795/wp-admin/admin-ajax.php and it gets the error cURL error 7: Failed to connect to localhost port 32795: Connection refused. There may be a problem with the server configuration (eg local DNS problems, mod_security, etc) preventing connections from working properly.



    I think the problem is that the site inside the container tries to communicate with the 32795 port instead of 80, but it can not because this door is only seen from the outside of the container...



    I created a script inside the site with phpinfo, and I checked the loopback connections are on...



    There is a solution for this? I have docker un windows with kitematic



    thanks










    share|improve this question
























      0












      0








      0








      I have a wordpress official container with a dock port 80 mapped to 32795 external... when I go to administration area of wordpress I get this error:



      Important: HTTP Loopback Connections are not enabled on this server. If you need to contact your web host, tell them that when PHP tries to connect back to the site at the URL http://localhost:32795/wp-admin/admin-ajax.php and it gets the error cURL error 7: Failed to connect to localhost port 32795: Connection refused. There may be a problem with the server configuration (eg local DNS problems, mod_security, etc) preventing connections from working properly.



      I think the problem is that the site inside the container tries to communicate with the 32795 port instead of 80, but it can not because this door is only seen from the outside of the container...



      I created a script inside the site with phpinfo, and I checked the loopback connections are on...



      There is a solution for this? I have docker un windows with kitematic



      thanks










      share|improve this question














      I have a wordpress official container with a dock port 80 mapped to 32795 external... when I go to administration area of wordpress I get this error:



      Important: HTTP Loopback Connections are not enabled on this server. If you need to contact your web host, tell them that when PHP tries to connect back to the site at the URL http://localhost:32795/wp-admin/admin-ajax.php and it gets the error cURL error 7: Failed to connect to localhost port 32795: Connection refused. There may be a problem with the server configuration (eg local DNS problems, mod_security, etc) preventing connections from working properly.



      I think the problem is that the site inside the container tries to communicate with the 32795 port instead of 80, but it can not because this door is only seen from the outside of the container...



      I created a script inside the site with phpinfo, and I checked the loopback connections are on...



      There is a solution for this? I have docker un windows with kitematic



      thanks







      wordpress docker kitematic






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 6 at 15:27









      Sandro CirliniSandro Cirlini

      20114




      20114






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Problem is inside the container the opened port is 80 and docker is exposing 32795 for external connections



          Wordpress configuration is pointing to port 32795, you might expose port 80 by doing docker run -p 80:80 and change wordpress configuration to use port 80



          If you can't use port :80 a little bit more complicated solution is to use iptables port forwarding internally



          Example



          ➜ ~ docker run -d --cap-add=NET_ADMIN --cap-add=NET_RAW -p 5000:80 nginx 
          835b039cc92bd9f32b960181bf370d39869c88f5a757423966b467fe01ac219e
          ➜ ~ docker exec -it 835b039cc92bd9 bash
          root@835b039cc92b:/# apt update -qqq ; apt install iptables -yqqq
          root@835b039cc92b:/# iptables -t nat -A OUTPUT -o lo -p tcp --dport 5000 -j REDIRECT --to-
          port 80
          root@835b039cc92b:/# apt install telnet -yqqq
          root@835b039cc92b:/# telnet localhost 5000
          Trying 127.0.0.1...
          Connected to localhost.
          Escape character is '^]'.
          ^]
          telnet> quit
          Connection closed.
          root@835b039cc92b:/# exit

          # from outside the container
          ➜ ~ telnet localhost 5000
          Trying ::1...
          Connected to localhost.
          Escape character is '^]'.
          ^]
          telnet> quit
          Connection closed.





          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55026639%2fhttp-loopback-connections-are-not-enabled-on-this-server-wordpress-on-docker%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Problem is inside the container the opened port is 80 and docker is exposing 32795 for external connections



            Wordpress configuration is pointing to port 32795, you might expose port 80 by doing docker run -p 80:80 and change wordpress configuration to use port 80



            If you can't use port :80 a little bit more complicated solution is to use iptables port forwarding internally



            Example



            ➜ ~ docker run -d --cap-add=NET_ADMIN --cap-add=NET_RAW -p 5000:80 nginx 
            835b039cc92bd9f32b960181bf370d39869c88f5a757423966b467fe01ac219e
            ➜ ~ docker exec -it 835b039cc92bd9 bash
            root@835b039cc92b:/# apt update -qqq ; apt install iptables -yqqq
            root@835b039cc92b:/# iptables -t nat -A OUTPUT -o lo -p tcp --dport 5000 -j REDIRECT --to-
            port 80
            root@835b039cc92b:/# apt install telnet -yqqq
            root@835b039cc92b:/# telnet localhost 5000
            Trying 127.0.0.1...
            Connected to localhost.
            Escape character is '^]'.
            ^]
            telnet> quit
            Connection closed.
            root@835b039cc92b:/# exit

            # from outside the container
            ➜ ~ telnet localhost 5000
            Trying ::1...
            Connected to localhost.
            Escape character is '^]'.
            ^]
            telnet> quit
            Connection closed.





            share|improve this answer



























              0














              Problem is inside the container the opened port is 80 and docker is exposing 32795 for external connections



              Wordpress configuration is pointing to port 32795, you might expose port 80 by doing docker run -p 80:80 and change wordpress configuration to use port 80



              If you can't use port :80 a little bit more complicated solution is to use iptables port forwarding internally



              Example



              ➜ ~ docker run -d --cap-add=NET_ADMIN --cap-add=NET_RAW -p 5000:80 nginx 
              835b039cc92bd9f32b960181bf370d39869c88f5a757423966b467fe01ac219e
              ➜ ~ docker exec -it 835b039cc92bd9 bash
              root@835b039cc92b:/# apt update -qqq ; apt install iptables -yqqq
              root@835b039cc92b:/# iptables -t nat -A OUTPUT -o lo -p tcp --dport 5000 -j REDIRECT --to-
              port 80
              root@835b039cc92b:/# apt install telnet -yqqq
              root@835b039cc92b:/# telnet localhost 5000
              Trying 127.0.0.1...
              Connected to localhost.
              Escape character is '^]'.
              ^]
              telnet> quit
              Connection closed.
              root@835b039cc92b:/# exit

              # from outside the container
              ➜ ~ telnet localhost 5000
              Trying ::1...
              Connected to localhost.
              Escape character is '^]'.
              ^]
              telnet> quit
              Connection closed.





              share|improve this answer

























                0












                0








                0







                Problem is inside the container the opened port is 80 and docker is exposing 32795 for external connections



                Wordpress configuration is pointing to port 32795, you might expose port 80 by doing docker run -p 80:80 and change wordpress configuration to use port 80



                If you can't use port :80 a little bit more complicated solution is to use iptables port forwarding internally



                Example



                ➜ ~ docker run -d --cap-add=NET_ADMIN --cap-add=NET_RAW -p 5000:80 nginx 
                835b039cc92bd9f32b960181bf370d39869c88f5a757423966b467fe01ac219e
                ➜ ~ docker exec -it 835b039cc92bd9 bash
                root@835b039cc92b:/# apt update -qqq ; apt install iptables -yqqq
                root@835b039cc92b:/# iptables -t nat -A OUTPUT -o lo -p tcp --dport 5000 -j REDIRECT --to-
                port 80
                root@835b039cc92b:/# apt install telnet -yqqq
                root@835b039cc92b:/# telnet localhost 5000
                Trying 127.0.0.1...
                Connected to localhost.
                Escape character is '^]'.
                ^]
                telnet> quit
                Connection closed.
                root@835b039cc92b:/# exit

                # from outside the container
                ➜ ~ telnet localhost 5000
                Trying ::1...
                Connected to localhost.
                Escape character is '^]'.
                ^]
                telnet> quit
                Connection closed.





                share|improve this answer













                Problem is inside the container the opened port is 80 and docker is exposing 32795 for external connections



                Wordpress configuration is pointing to port 32795, you might expose port 80 by doing docker run -p 80:80 and change wordpress configuration to use port 80



                If you can't use port :80 a little bit more complicated solution is to use iptables port forwarding internally



                Example



                ➜ ~ docker run -d --cap-add=NET_ADMIN --cap-add=NET_RAW -p 5000:80 nginx 
                835b039cc92bd9f32b960181bf370d39869c88f5a757423966b467fe01ac219e
                ➜ ~ docker exec -it 835b039cc92bd9 bash
                root@835b039cc92b:/# apt update -qqq ; apt install iptables -yqqq
                root@835b039cc92b:/# iptables -t nat -A OUTPUT -o lo -p tcp --dport 5000 -j REDIRECT --to-
                port 80
                root@835b039cc92b:/# apt install telnet -yqqq
                root@835b039cc92b:/# telnet localhost 5000
                Trying 127.0.0.1...
                Connected to localhost.
                Escape character is '^]'.
                ^]
                telnet> quit
                Connection closed.
                root@835b039cc92b:/# exit

                # from outside the container
                ➜ ~ telnet localhost 5000
                Trying ::1...
                Connected to localhost.
                Escape character is '^]'.
                ^]
                telnet> quit
                Connection closed.






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 6 at 15:57









                Hernan GarciaHernan Garcia

                513315




                513315





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55026639%2fhttp-loopback-connections-are-not-enabled-on-this-server-wordpress-on-docker%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved