Apache2 does not run on IPv4 tcp port












18














I need run Apache2 on my Debian 7 server. But it run only on tcpv6 port, not on tcpv4 port. I installed it with apt-get install. If I go to localhost or 127.0.0.1 or my server IPv4 address it does not display any website.



My /etc/apache2/ports.conf:



# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>


netstat -plntu:



tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3558/sshd       
tcp 0 0 0.0.0.0:3466 0.0.0.0:* LISTEN 2820/mysqld
tcp6 0 0 :::80 :::* LISTEN 2097/apache2
tcp6 0 0 :::22 :::* LISTEN 3558/sshd









share|improve this question




















  • 3




    Try changing the Listen 80 to Listen 0.0.0.0:80. You can refer to the documentation httpd.apache.org/docs/2.2/bind.html for more information.
    – pradeepchhetri
    Dec 24 '13 at 14:58










  • @pradeepchhetri Thank you. It works. I can access to my server address from any computer and it show content (IP address/some.php), but I don´t access to some.php from this server. I have tried localhost, 127.0.0.1 and external IP:port number that works from other PC... But it does not work.
    – Mato
    Dec 25 '13 at 14:12










  • Can you post the output of sudo iptables -nvL and sudo sestatus ? I think you have some local firewall which is preventing.
    – pradeepchhetri
    Dec 25 '13 at 17:25










  • @Mato you need to clarify, when it shows content but not working, do you mean that it's showing your the raw PHP instead of running it? If so, you need to enable the PHP module. I think a2enmod php5 should do it for you.
    – robbat2
    Dec 26 '13 at 17:05






  • 2




    Linux machines typically hide a dualstack IPv4+IPv6 socket behind listening on IPv6 address ::.
    – Pavel Šimerda
    Jul 12 '14 at 20:55
















18














I need run Apache2 on my Debian 7 server. But it run only on tcpv6 port, not on tcpv4 port. I installed it with apt-get install. If I go to localhost or 127.0.0.1 or my server IPv4 address it does not display any website.



My /etc/apache2/ports.conf:



# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>


netstat -plntu:



tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3558/sshd       
tcp 0 0 0.0.0.0:3466 0.0.0.0:* LISTEN 2820/mysqld
tcp6 0 0 :::80 :::* LISTEN 2097/apache2
tcp6 0 0 :::22 :::* LISTEN 3558/sshd









share|improve this question




















  • 3




    Try changing the Listen 80 to Listen 0.0.0.0:80. You can refer to the documentation httpd.apache.org/docs/2.2/bind.html for more information.
    – pradeepchhetri
    Dec 24 '13 at 14:58










  • @pradeepchhetri Thank you. It works. I can access to my server address from any computer and it show content (IP address/some.php), but I don´t access to some.php from this server. I have tried localhost, 127.0.0.1 and external IP:port number that works from other PC... But it does not work.
    – Mato
    Dec 25 '13 at 14:12










  • Can you post the output of sudo iptables -nvL and sudo sestatus ? I think you have some local firewall which is preventing.
    – pradeepchhetri
    Dec 25 '13 at 17:25










  • @Mato you need to clarify, when it shows content but not working, do you mean that it's showing your the raw PHP instead of running it? If so, you need to enable the PHP module. I think a2enmod php5 should do it for you.
    – robbat2
    Dec 26 '13 at 17:05






  • 2




    Linux machines typically hide a dualstack IPv4+IPv6 socket behind listening on IPv6 address ::.
    – Pavel Šimerda
    Jul 12 '14 at 20:55














18












18








18


6





I need run Apache2 on my Debian 7 server. But it run only on tcpv6 port, not on tcpv4 port. I installed it with apt-get install. If I go to localhost or 127.0.0.1 or my server IPv4 address it does not display any website.



My /etc/apache2/ports.conf:



# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>


netstat -plntu:



tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3558/sshd       
tcp 0 0 0.0.0.0:3466 0.0.0.0:* LISTEN 2820/mysqld
tcp6 0 0 :::80 :::* LISTEN 2097/apache2
tcp6 0 0 :::22 :::* LISTEN 3558/sshd









share|improve this question















I need run Apache2 on my Debian 7 server. But it run only on tcpv6 port, not on tcpv4 port. I installed it with apt-get install. If I go to localhost or 127.0.0.1 or my server IPv4 address it does not display any website.



My /etc/apache2/ports.conf:



# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>


netstat -plntu:



tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3558/sshd       
tcp 0 0 0.0.0.0:3466 0.0.0.0:* LISTEN 2820/mysqld
tcp6 0 0 :::80 :::* LISTEN 2097/apache2
tcp6 0 0 :::22 :::* LISTEN 3558/sshd






debian apache-httpd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 18 at 14:11









Rui F Ribeiro

38.9k1479129




38.9k1479129










asked Dec 24 '13 at 13:46









Mato

701616




701616








  • 3




    Try changing the Listen 80 to Listen 0.0.0.0:80. You can refer to the documentation httpd.apache.org/docs/2.2/bind.html for more information.
    – pradeepchhetri
    Dec 24 '13 at 14:58










  • @pradeepchhetri Thank you. It works. I can access to my server address from any computer and it show content (IP address/some.php), but I don´t access to some.php from this server. I have tried localhost, 127.0.0.1 and external IP:port number that works from other PC... But it does not work.
    – Mato
    Dec 25 '13 at 14:12










  • Can you post the output of sudo iptables -nvL and sudo sestatus ? I think you have some local firewall which is preventing.
    – pradeepchhetri
    Dec 25 '13 at 17:25










  • @Mato you need to clarify, when it shows content but not working, do you mean that it's showing your the raw PHP instead of running it? If so, you need to enable the PHP module. I think a2enmod php5 should do it for you.
    – robbat2
    Dec 26 '13 at 17:05






  • 2




    Linux machines typically hide a dualstack IPv4+IPv6 socket behind listening on IPv6 address ::.
    – Pavel Šimerda
    Jul 12 '14 at 20:55














  • 3




    Try changing the Listen 80 to Listen 0.0.0.0:80. You can refer to the documentation httpd.apache.org/docs/2.2/bind.html for more information.
    – pradeepchhetri
    Dec 24 '13 at 14:58










  • @pradeepchhetri Thank you. It works. I can access to my server address from any computer and it show content (IP address/some.php), but I don´t access to some.php from this server. I have tried localhost, 127.0.0.1 and external IP:port number that works from other PC... But it does not work.
    – Mato
    Dec 25 '13 at 14:12










  • Can you post the output of sudo iptables -nvL and sudo sestatus ? I think you have some local firewall which is preventing.
    – pradeepchhetri
    Dec 25 '13 at 17:25










  • @Mato you need to clarify, when it shows content but not working, do you mean that it's showing your the raw PHP instead of running it? If so, you need to enable the PHP module. I think a2enmod php5 should do it for you.
    – robbat2
    Dec 26 '13 at 17:05






  • 2




    Linux machines typically hide a dualstack IPv4+IPv6 socket behind listening on IPv6 address ::.
    – Pavel Šimerda
    Jul 12 '14 at 20:55








3




3




Try changing the Listen 80 to Listen 0.0.0.0:80. You can refer to the documentation httpd.apache.org/docs/2.2/bind.html for more information.
– pradeepchhetri
Dec 24 '13 at 14:58




Try changing the Listen 80 to Listen 0.0.0.0:80. You can refer to the documentation httpd.apache.org/docs/2.2/bind.html for more information.
– pradeepchhetri
Dec 24 '13 at 14:58












@pradeepchhetri Thank you. It works. I can access to my server address from any computer and it show content (IP address/some.php), but I don´t access to some.php from this server. I have tried localhost, 127.0.0.1 and external IP:port number that works from other PC... But it does not work.
– Mato
Dec 25 '13 at 14:12




@pradeepchhetri Thank you. It works. I can access to my server address from any computer and it show content (IP address/some.php), but I don´t access to some.php from this server. I have tried localhost, 127.0.0.1 and external IP:port number that works from other PC... But it does not work.
– Mato
Dec 25 '13 at 14:12












Can you post the output of sudo iptables -nvL and sudo sestatus ? I think you have some local firewall which is preventing.
– pradeepchhetri
Dec 25 '13 at 17:25




Can you post the output of sudo iptables -nvL and sudo sestatus ? I think you have some local firewall which is preventing.
– pradeepchhetri
Dec 25 '13 at 17:25












@Mato you need to clarify, when it shows content but not working, do you mean that it's showing your the raw PHP instead of running it? If so, you need to enable the PHP module. I think a2enmod php5 should do it for you.
– robbat2
Dec 26 '13 at 17:05




@Mato you need to clarify, when it shows content but not working, do you mean that it's showing your the raw PHP instead of running it? If so, you need to enable the PHP module. I think a2enmod php5 should do it for you.
– robbat2
Dec 26 '13 at 17:05




2




2




Linux machines typically hide a dualstack IPv4+IPv6 socket behind listening on IPv6 address ::.
– Pavel Šimerda
Jul 12 '14 at 20:55




Linux machines typically hide a dualstack IPv4+IPv6 socket behind listening on IPv6 address ::.
– Pavel Šimerda
Jul 12 '14 at 20:55










4 Answers
4






active

oldest

votes


















23














The fact that netstat shows only tcp6 here is not the problem. If you don't specify an address to listen on, apache will listen on all supported address families using a single socket (for design reasons, sshd uses a unique socket per address & address family, hence showing up twice in your netstat output).



Here's one of my systems, showing apache having only tcp6 sockets, and yet still working fine via both IPv4 and IPv6.



woodpecker ~ # netstat -anp |grep apache
tcp6 0 0 :::80 :::* LISTEN 1637/apache2
tcp6 0 0 :::443 :::* LISTEN 1637/apache2
woodpecker ~ # wget http://127.0.0.1/ -O /dev/null
--2013-12-25 08:52:38-- http://127.0.0.1/
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45 [text/html]
...
# wget http://[::1]/ -O /dev/null
--2013-12-25 08:53:00-- http://[::1]/
Connecting to [::1]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45 [text/html]
...


If you run wget http://127.0.0.1/ -O - on the server what happens? Does it successfully connect? Does it return the raw HTML for your website as expected?






share|improve this answer





















  • thanks, now it works, but I have only one small problem yet. I have wrote about it above.
    – Mato
    Dec 25 '13 at 14:14



















3














This will handle IPV4 connections only:



Listen 0.0.0.0:80
Listen 192.0.2.1:80


https://httpd.apache.org/docs/2.2/bind.html#ipv6






share|improve this answer





























    0















    1. 127.0.0.1 is local to a machine only, you have to be on the server itself in a
      browser to use the local loopback ip/address;


    2. You might have a firewall blocking ports;


    3. Make sure apache is running and working properly, check error
      logs;


    4. Double check all your apache configs;


    5. Are you hosting from the root www or the user public_html folder?


    6. Double check owner and permissions.





    Almost the year 2019 (Welcome to the future):




    • By default most of the world uses ipv6 and if fails, falls back on
      ipv4;


    • We now have ipv4 tunnels over ipv6, and vise-versa;


    • Most OS, programs, client, and server alike mostly do this now;


    • Welcome to the world of no more NATs and having to depend now on
      firewall/filters right to your device;


    • I would recommend trying to keep your systems all dual stacked, supporting both ipv4
      and ipv6 at the same time, so when the magic switch happens, you're still up and
      running. My OS, network, even my ISP is dual stacked end to end. I could turn off ipv4
      fully if I wanted to, but what's out there that might not work anymore if no tunnels
      exist back to ipv6 from ipv4.







    share|improve this answer





























      -1














      *




      wget http://127.0.0.1/ -O /dev/null




      *
      represents connection to local server without handling IPv4 or IPv6, if you change localhost (or 127.0.0.1) to real IPv4 IP address of this server, you cant wget anything because denied connection.



      Try to describe you IP in config files:
      NameVirtualHost :80
      Listen :80






      share|improve this answer





















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "106"
        };
        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: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        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%2funix.stackexchange.com%2fquestions%2f106502%2fapache2-does-not-run-on-ipv4-tcp-port%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        23














        The fact that netstat shows only tcp6 here is not the problem. If you don't specify an address to listen on, apache will listen on all supported address families using a single socket (for design reasons, sshd uses a unique socket per address & address family, hence showing up twice in your netstat output).



        Here's one of my systems, showing apache having only tcp6 sockets, and yet still working fine via both IPv4 and IPv6.



        woodpecker ~ # netstat -anp |grep apache
        tcp6 0 0 :::80 :::* LISTEN 1637/apache2
        tcp6 0 0 :::443 :::* LISTEN 1637/apache2
        woodpecker ~ # wget http://127.0.0.1/ -O /dev/null
        --2013-12-25 08:52:38-- http://127.0.0.1/
        Connecting to 127.0.0.1:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...
        # wget http://[::1]/ -O /dev/null
        --2013-12-25 08:53:00-- http://[::1]/
        Connecting to [::1]:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...


        If you run wget http://127.0.0.1/ -O - on the server what happens? Does it successfully connect? Does it return the raw HTML for your website as expected?






        share|improve this answer





















        • thanks, now it works, but I have only one small problem yet. I have wrote about it above.
          – Mato
          Dec 25 '13 at 14:14
















        23














        The fact that netstat shows only tcp6 here is not the problem. If you don't specify an address to listen on, apache will listen on all supported address families using a single socket (for design reasons, sshd uses a unique socket per address & address family, hence showing up twice in your netstat output).



        Here's one of my systems, showing apache having only tcp6 sockets, and yet still working fine via both IPv4 and IPv6.



        woodpecker ~ # netstat -anp |grep apache
        tcp6 0 0 :::80 :::* LISTEN 1637/apache2
        tcp6 0 0 :::443 :::* LISTEN 1637/apache2
        woodpecker ~ # wget http://127.0.0.1/ -O /dev/null
        --2013-12-25 08:52:38-- http://127.0.0.1/
        Connecting to 127.0.0.1:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...
        # wget http://[::1]/ -O /dev/null
        --2013-12-25 08:53:00-- http://[::1]/
        Connecting to [::1]:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...


        If you run wget http://127.0.0.1/ -O - on the server what happens? Does it successfully connect? Does it return the raw HTML for your website as expected?






        share|improve this answer





















        • thanks, now it works, but I have only one small problem yet. I have wrote about it above.
          – Mato
          Dec 25 '13 at 14:14














        23












        23








        23






        The fact that netstat shows only tcp6 here is not the problem. If you don't specify an address to listen on, apache will listen on all supported address families using a single socket (for design reasons, sshd uses a unique socket per address & address family, hence showing up twice in your netstat output).



        Here's one of my systems, showing apache having only tcp6 sockets, and yet still working fine via both IPv4 and IPv6.



        woodpecker ~ # netstat -anp |grep apache
        tcp6 0 0 :::80 :::* LISTEN 1637/apache2
        tcp6 0 0 :::443 :::* LISTEN 1637/apache2
        woodpecker ~ # wget http://127.0.0.1/ -O /dev/null
        --2013-12-25 08:52:38-- http://127.0.0.1/
        Connecting to 127.0.0.1:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...
        # wget http://[::1]/ -O /dev/null
        --2013-12-25 08:53:00-- http://[::1]/
        Connecting to [::1]:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...


        If you run wget http://127.0.0.1/ -O - on the server what happens? Does it successfully connect? Does it return the raw HTML for your website as expected?






        share|improve this answer












        The fact that netstat shows only tcp6 here is not the problem. If you don't specify an address to listen on, apache will listen on all supported address families using a single socket (for design reasons, sshd uses a unique socket per address & address family, hence showing up twice in your netstat output).



        Here's one of my systems, showing apache having only tcp6 sockets, and yet still working fine via both IPv4 and IPv6.



        woodpecker ~ # netstat -anp |grep apache
        tcp6 0 0 :::80 :::* LISTEN 1637/apache2
        tcp6 0 0 :::443 :::* LISTEN 1637/apache2
        woodpecker ~ # wget http://127.0.0.1/ -O /dev/null
        --2013-12-25 08:52:38-- http://127.0.0.1/
        Connecting to 127.0.0.1:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...
        # wget http://[::1]/ -O /dev/null
        --2013-12-25 08:53:00-- http://[::1]/
        Connecting to [::1]:80... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 45 [text/html]
        ...


        If you run wget http://127.0.0.1/ -O - on the server what happens? Does it successfully connect? Does it return the raw HTML for your website as expected?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 25 '13 at 8:59









        robbat2

        2,473926




        2,473926












        • thanks, now it works, but I have only one small problem yet. I have wrote about it above.
          – Mato
          Dec 25 '13 at 14:14


















        • thanks, now it works, but I have only one small problem yet. I have wrote about it above.
          – Mato
          Dec 25 '13 at 14:14
















        thanks, now it works, but I have only one small problem yet. I have wrote about it above.
        – Mato
        Dec 25 '13 at 14:14




        thanks, now it works, but I have only one small problem yet. I have wrote about it above.
        – Mato
        Dec 25 '13 at 14:14













        3














        This will handle IPV4 connections only:



        Listen 0.0.0.0:80
        Listen 192.0.2.1:80


        https://httpd.apache.org/docs/2.2/bind.html#ipv6






        share|improve this answer


























          3














          This will handle IPV4 connections only:



          Listen 0.0.0.0:80
          Listen 192.0.2.1:80


          https://httpd.apache.org/docs/2.2/bind.html#ipv6






          share|improve this answer
























            3












            3








            3






            This will handle IPV4 connections only:



            Listen 0.0.0.0:80
            Listen 192.0.2.1:80


            https://httpd.apache.org/docs/2.2/bind.html#ipv6






            share|improve this answer












            This will handle IPV4 connections only:



            Listen 0.0.0.0:80
            Listen 192.0.2.1:80


            https://httpd.apache.org/docs/2.2/bind.html#ipv6







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 21 '15 at 10:05









            wzs1989

            311




            311























                0















                1. 127.0.0.1 is local to a machine only, you have to be on the server itself in a
                  browser to use the local loopback ip/address;


                2. You might have a firewall blocking ports;


                3. Make sure apache is running and working properly, check error
                  logs;


                4. Double check all your apache configs;


                5. Are you hosting from the root www or the user public_html folder?


                6. Double check owner and permissions.





                Almost the year 2019 (Welcome to the future):




                • By default most of the world uses ipv6 and if fails, falls back on
                  ipv4;


                • We now have ipv4 tunnels over ipv6, and vise-versa;


                • Most OS, programs, client, and server alike mostly do this now;


                • Welcome to the world of no more NATs and having to depend now on
                  firewall/filters right to your device;


                • I would recommend trying to keep your systems all dual stacked, supporting both ipv4
                  and ipv6 at the same time, so when the magic switch happens, you're still up and
                  running. My OS, network, even my ISP is dual stacked end to end. I could turn off ipv4
                  fully if I wanted to, but what's out there that might not work anymore if no tunnels
                  exist back to ipv6 from ipv4.







                share|improve this answer


























                  0















                  1. 127.0.0.1 is local to a machine only, you have to be on the server itself in a
                    browser to use the local loopback ip/address;


                  2. You might have a firewall blocking ports;


                  3. Make sure apache is running and working properly, check error
                    logs;


                  4. Double check all your apache configs;


                  5. Are you hosting from the root www or the user public_html folder?


                  6. Double check owner and permissions.





                  Almost the year 2019 (Welcome to the future):




                  • By default most of the world uses ipv6 and if fails, falls back on
                    ipv4;


                  • We now have ipv4 tunnels over ipv6, and vise-versa;


                  • Most OS, programs, client, and server alike mostly do this now;


                  • Welcome to the world of no more NATs and having to depend now on
                    firewall/filters right to your device;


                  • I would recommend trying to keep your systems all dual stacked, supporting both ipv4
                    and ipv6 at the same time, so when the magic switch happens, you're still up and
                    running. My OS, network, even my ISP is dual stacked end to end. I could turn off ipv4
                    fully if I wanted to, but what's out there that might not work anymore if no tunnels
                    exist back to ipv6 from ipv4.







                  share|improve this answer
























                    0












                    0








                    0







                    1. 127.0.0.1 is local to a machine only, you have to be on the server itself in a
                      browser to use the local loopback ip/address;


                    2. You might have a firewall blocking ports;


                    3. Make sure apache is running and working properly, check error
                      logs;


                    4. Double check all your apache configs;


                    5. Are you hosting from the root www or the user public_html folder?


                    6. Double check owner and permissions.





                    Almost the year 2019 (Welcome to the future):




                    • By default most of the world uses ipv6 and if fails, falls back on
                      ipv4;


                    • We now have ipv4 tunnels over ipv6, and vise-versa;


                    • Most OS, programs, client, and server alike mostly do this now;


                    • Welcome to the world of no more NATs and having to depend now on
                      firewall/filters right to your device;


                    • I would recommend trying to keep your systems all dual stacked, supporting both ipv4
                      and ipv6 at the same time, so when the magic switch happens, you're still up and
                      running. My OS, network, even my ISP is dual stacked end to end. I could turn off ipv4
                      fully if I wanted to, but what's out there that might not work anymore if no tunnels
                      exist back to ipv6 from ipv4.







                    share|improve this answer













                    1. 127.0.0.1 is local to a machine only, you have to be on the server itself in a
                      browser to use the local loopback ip/address;


                    2. You might have a firewall blocking ports;


                    3. Make sure apache is running and working properly, check error
                      logs;


                    4. Double check all your apache configs;


                    5. Are you hosting from the root www or the user public_html folder?


                    6. Double check owner and permissions.





                    Almost the year 2019 (Welcome to the future):




                    • By default most of the world uses ipv6 and if fails, falls back on
                      ipv4;


                    • We now have ipv4 tunnels over ipv6, and vise-versa;


                    • Most OS, programs, client, and server alike mostly do this now;


                    • Welcome to the world of no more NATs and having to depend now on
                      firewall/filters right to your device;


                    • I would recommend trying to keep your systems all dual stacked, supporting both ipv4
                      and ipv6 at the same time, so when the magic switch happens, you're still up and
                      running. My OS, network, even my ISP is dual stacked end to end. I could turn off ipv4
                      fully if I wanted to, but what's out there that might not work anymore if no tunnels
                      exist back to ipv6 from ipv4.








                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 16 at 22:47









                    cdmlb

                    11




                    11























                        -1














                        *




                        wget http://127.0.0.1/ -O /dev/null




                        *
                        represents connection to local server without handling IPv4 or IPv6, if you change localhost (or 127.0.0.1) to real IPv4 IP address of this server, you cant wget anything because denied connection.



                        Try to describe you IP in config files:
                        NameVirtualHost :80
                        Listen :80






                        share|improve this answer


























                          -1














                          *




                          wget http://127.0.0.1/ -O /dev/null




                          *
                          represents connection to local server without handling IPv4 or IPv6, if you change localhost (or 127.0.0.1) to real IPv4 IP address of this server, you cant wget anything because denied connection.



                          Try to describe you IP in config files:
                          NameVirtualHost :80
                          Listen :80






                          share|improve this answer
























                            -1












                            -1








                            -1






                            *




                            wget http://127.0.0.1/ -O /dev/null




                            *
                            represents connection to local server without handling IPv4 or IPv6, if you change localhost (or 127.0.0.1) to real IPv4 IP address of this server, you cant wget anything because denied connection.



                            Try to describe you IP in config files:
                            NameVirtualHost :80
                            Listen :80






                            share|improve this answer












                            *




                            wget http://127.0.0.1/ -O /dev/null




                            *
                            represents connection to local server without handling IPv4 or IPv6, if you change localhost (or 127.0.0.1) to real IPv4 IP address of this server, you cant wget anything because denied connection.



                            Try to describe you IP in config files:
                            NameVirtualHost :80
                            Listen :80







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jul 13 '15 at 10:53









                            Guest

                            1




                            1






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Unix & Linux Stack Exchange!


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





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • 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%2funix.stackexchange.com%2fquestions%2f106502%2fapache2-does-not-run-on-ipv4-tcp-port%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

                                Morgemoulin

                                Scott Moir

                                Souastre