apache2 on ubuntu 14 - localhost works but ip doesn't











up vote
2
down vote

favorite












I've just installed apache2 on my box, along with php5.



I can navigate to "localhost" and it works. But I can't access this webserver from another machine... or even locally using the IP address.
Other posts such as Apache (and other services) work on localhost, but not IP address suggest firewall settings and also checking to make sure I'm listening not just on localhost but *80.



This is what I have in ports.conf:



me@mydev:/etc/apache2$ cat 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.conf

Listen 80

<IfModule ssl_module> Listen 443 </IfModule>

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

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


The default firewall doesn't seem to be enabled:



me@mydev:/etc/apache2$ sudo ufw status
[sudo] password for me:
Status: inactive
me@mydev:/etc/apache2$


Just not sure what else I should check.
Thanks.



EDIT 1



Results from IP tables query:




me@mydev:/etc/apache2$ sudo iptables -L [sudo] password for me:
Chain INPUT (policy ACCEPT) target prot opt source

destination



Chain FORWARD (policy ACCEPT) target prot opt source

destination



Chain OUTPUT (policy ACCEPT) target prot opt source

destination me@mydev:/etc/apache2$




And I am able to successfully ping the box from different machines.



EDIT 2



Here are the results from the nmap command:



me@mydev:/var/www/html/test$ nmap localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:04 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00020s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
631/tcp open ipp

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$


And for the IP:



me@mydev:/var/www/html/test$ nmap 10.238.59.63

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:08 EST
Nmap scan report for mydev.testdomain.bg.org (10.238.59.63)
Host is up (0.00024s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$









share|improve this question
























  • Please edit your question with the output of sudo iptables -L. Also try to ping the ip address
    – Salem
    Nov 27 '14 at 21:47










  • What does 'nmap' gives when you run it on local host and your machines IPv4 address? Do you want to have Apache listening on IPv6? You need to have your Apache to listen to your IPv4 address, or the "listen to all address" address '0.0.0.0'. So it isn't enough to just set the ports you want your Apache to listen for connections on.
    – Anders
    Nov 29 '14 at 4:37












  • I'm not sure what's wrong, but to clear up some confusion... you don't listen on "localhost" or your ip address, you listen only on a port which is on your machine's ip address. "localhost" is simply a shortcut for your own ip address. Also, apache will respond to connections from other computers on the lan by default, I believe. What error do you get in the browser when you try to connect?
    – Marty Fried
    Dec 1 '14 at 4:08










  • @MartyFried I'm getting a connection timed out error message for the site when i try to connect from another machine on the LAN
    – dot
    Dec 1 '14 at 14:03










  • @Anders, please see my edit which includes results from "nmap" command
    – dot
    Dec 3 '14 at 13:54















up vote
2
down vote

favorite












I've just installed apache2 on my box, along with php5.



I can navigate to "localhost" and it works. But I can't access this webserver from another machine... or even locally using the IP address.
Other posts such as Apache (and other services) work on localhost, but not IP address suggest firewall settings and also checking to make sure I'm listening not just on localhost but *80.



This is what I have in ports.conf:



me@mydev:/etc/apache2$ cat 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.conf

Listen 80

<IfModule ssl_module> Listen 443 </IfModule>

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

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


The default firewall doesn't seem to be enabled:



me@mydev:/etc/apache2$ sudo ufw status
[sudo] password for me:
Status: inactive
me@mydev:/etc/apache2$


Just not sure what else I should check.
Thanks.



EDIT 1



Results from IP tables query:




me@mydev:/etc/apache2$ sudo iptables -L [sudo] password for me:
Chain INPUT (policy ACCEPT) target prot opt source

destination



Chain FORWARD (policy ACCEPT) target prot opt source

destination



Chain OUTPUT (policy ACCEPT) target prot opt source

destination me@mydev:/etc/apache2$




And I am able to successfully ping the box from different machines.



EDIT 2



Here are the results from the nmap command:



me@mydev:/var/www/html/test$ nmap localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:04 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00020s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
631/tcp open ipp

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$


And for the IP:



me@mydev:/var/www/html/test$ nmap 10.238.59.63

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:08 EST
Nmap scan report for mydev.testdomain.bg.org (10.238.59.63)
Host is up (0.00024s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$









share|improve this question
























  • Please edit your question with the output of sudo iptables -L. Also try to ping the ip address
    – Salem
    Nov 27 '14 at 21:47










  • What does 'nmap' gives when you run it on local host and your machines IPv4 address? Do you want to have Apache listening on IPv6? You need to have your Apache to listen to your IPv4 address, or the "listen to all address" address '0.0.0.0'. So it isn't enough to just set the ports you want your Apache to listen for connections on.
    – Anders
    Nov 29 '14 at 4:37












  • I'm not sure what's wrong, but to clear up some confusion... you don't listen on "localhost" or your ip address, you listen only on a port which is on your machine's ip address. "localhost" is simply a shortcut for your own ip address. Also, apache will respond to connections from other computers on the lan by default, I believe. What error do you get in the browser when you try to connect?
    – Marty Fried
    Dec 1 '14 at 4:08










  • @MartyFried I'm getting a connection timed out error message for the site when i try to connect from another machine on the LAN
    – dot
    Dec 1 '14 at 14:03










  • @Anders, please see my edit which includes results from "nmap" command
    – dot
    Dec 3 '14 at 13:54













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I've just installed apache2 on my box, along with php5.



I can navigate to "localhost" and it works. But I can't access this webserver from another machine... or even locally using the IP address.
Other posts such as Apache (and other services) work on localhost, but not IP address suggest firewall settings and also checking to make sure I'm listening not just on localhost but *80.



This is what I have in ports.conf:



me@mydev:/etc/apache2$ cat 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.conf

Listen 80

<IfModule ssl_module> Listen 443 </IfModule>

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

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


The default firewall doesn't seem to be enabled:



me@mydev:/etc/apache2$ sudo ufw status
[sudo] password for me:
Status: inactive
me@mydev:/etc/apache2$


Just not sure what else I should check.
Thanks.



EDIT 1



Results from IP tables query:




me@mydev:/etc/apache2$ sudo iptables -L [sudo] password for me:
Chain INPUT (policy ACCEPT) target prot opt source

destination



Chain FORWARD (policy ACCEPT) target prot opt source

destination



Chain OUTPUT (policy ACCEPT) target prot opt source

destination me@mydev:/etc/apache2$




And I am able to successfully ping the box from different machines.



EDIT 2



Here are the results from the nmap command:



me@mydev:/var/www/html/test$ nmap localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:04 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00020s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
631/tcp open ipp

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$


And for the IP:



me@mydev:/var/www/html/test$ nmap 10.238.59.63

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:08 EST
Nmap scan report for mydev.testdomain.bg.org (10.238.59.63)
Host is up (0.00024s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$









share|improve this question















I've just installed apache2 on my box, along with php5.



I can navigate to "localhost" and it works. But I can't access this webserver from another machine... or even locally using the IP address.
Other posts such as Apache (and other services) work on localhost, but not IP address suggest firewall settings and also checking to make sure I'm listening not just on localhost but *80.



This is what I have in ports.conf:



me@mydev:/etc/apache2$ cat 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.conf

Listen 80

<IfModule ssl_module> Listen 443 </IfModule>

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

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


The default firewall doesn't seem to be enabled:



me@mydev:/etc/apache2$ sudo ufw status
[sudo] password for me:
Status: inactive
me@mydev:/etc/apache2$


Just not sure what else I should check.
Thanks.



EDIT 1



Results from IP tables query:




me@mydev:/etc/apache2$ sudo iptables -L [sudo] password for me:
Chain INPUT (policy ACCEPT) target prot opt source

destination



Chain FORWARD (policy ACCEPT) target prot opt source

destination



Chain OUTPUT (policy ACCEPT) target prot opt source

destination me@mydev:/etc/apache2$




And I am able to successfully ping the box from different machines.



EDIT 2



Here are the results from the nmap command:



me@mydev:/var/www/html/test$ nmap localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:04 EST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00020s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
631/tcp open ipp

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$


And for the IP:



me@mydev:/var/www/html/test$ nmap 10.238.59.63

Starting Nmap 6.40 ( http://nmap.org ) at 2014-12-01 04:08 EST
Nmap scan report for mydev.testdomain.bg.org (10.238.59.63)
Host is up (0.00024s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds
me@mydev:/var/www/html/test$






networking apache2 php firewall






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:23









Community

1




1










asked Nov 27 '14 at 20:22









dot

25311128




25311128












  • Please edit your question with the output of sudo iptables -L. Also try to ping the ip address
    – Salem
    Nov 27 '14 at 21:47










  • What does 'nmap' gives when you run it on local host and your machines IPv4 address? Do you want to have Apache listening on IPv6? You need to have your Apache to listen to your IPv4 address, or the "listen to all address" address '0.0.0.0'. So it isn't enough to just set the ports you want your Apache to listen for connections on.
    – Anders
    Nov 29 '14 at 4:37












  • I'm not sure what's wrong, but to clear up some confusion... you don't listen on "localhost" or your ip address, you listen only on a port which is on your machine's ip address. "localhost" is simply a shortcut for your own ip address. Also, apache will respond to connections from other computers on the lan by default, I believe. What error do you get in the browser when you try to connect?
    – Marty Fried
    Dec 1 '14 at 4:08










  • @MartyFried I'm getting a connection timed out error message for the site when i try to connect from another machine on the LAN
    – dot
    Dec 1 '14 at 14:03










  • @Anders, please see my edit which includes results from "nmap" command
    – dot
    Dec 3 '14 at 13:54


















  • Please edit your question with the output of sudo iptables -L. Also try to ping the ip address
    – Salem
    Nov 27 '14 at 21:47










  • What does 'nmap' gives when you run it on local host and your machines IPv4 address? Do you want to have Apache listening on IPv6? You need to have your Apache to listen to your IPv4 address, or the "listen to all address" address '0.0.0.0'. So it isn't enough to just set the ports you want your Apache to listen for connections on.
    – Anders
    Nov 29 '14 at 4:37












  • I'm not sure what's wrong, but to clear up some confusion... you don't listen on "localhost" or your ip address, you listen only on a port which is on your machine's ip address. "localhost" is simply a shortcut for your own ip address. Also, apache will respond to connections from other computers on the lan by default, I believe. What error do you get in the browser when you try to connect?
    – Marty Fried
    Dec 1 '14 at 4:08










  • @MartyFried I'm getting a connection timed out error message for the site when i try to connect from another machine on the LAN
    – dot
    Dec 1 '14 at 14:03










  • @Anders, please see my edit which includes results from "nmap" command
    – dot
    Dec 3 '14 at 13:54
















Please edit your question with the output of sudo iptables -L. Also try to ping the ip address
– Salem
Nov 27 '14 at 21:47




Please edit your question with the output of sudo iptables -L. Also try to ping the ip address
– Salem
Nov 27 '14 at 21:47












What does 'nmap' gives when you run it on local host and your machines IPv4 address? Do you want to have Apache listening on IPv6? You need to have your Apache to listen to your IPv4 address, or the "listen to all address" address '0.0.0.0'. So it isn't enough to just set the ports you want your Apache to listen for connections on.
– Anders
Nov 29 '14 at 4:37






What does 'nmap' gives when you run it on local host and your machines IPv4 address? Do you want to have Apache listening on IPv6? You need to have your Apache to listen to your IPv4 address, or the "listen to all address" address '0.0.0.0'. So it isn't enough to just set the ports you want your Apache to listen for connections on.
– Anders
Nov 29 '14 at 4:37














I'm not sure what's wrong, but to clear up some confusion... you don't listen on "localhost" or your ip address, you listen only on a port which is on your machine's ip address. "localhost" is simply a shortcut for your own ip address. Also, apache will respond to connections from other computers on the lan by default, I believe. What error do you get in the browser when you try to connect?
– Marty Fried
Dec 1 '14 at 4:08




I'm not sure what's wrong, but to clear up some confusion... you don't listen on "localhost" or your ip address, you listen only on a port which is on your machine's ip address. "localhost" is simply a shortcut for your own ip address. Also, apache will respond to connections from other computers on the lan by default, I believe. What error do you get in the browser when you try to connect?
– Marty Fried
Dec 1 '14 at 4:08












@MartyFried I'm getting a connection timed out error message for the site when i try to connect from another machine on the LAN
– dot
Dec 1 '14 at 14:03




@MartyFried I'm getting a connection timed out error message for the site when i try to connect from another machine on the LAN
– dot
Dec 1 '14 at 14:03












@Anders, please see my edit which includes results from "nmap" command
– dot
Dec 3 '14 at 13:54




@Anders, please see my edit which includes results from "nmap" command
– dot
Dec 3 '14 at 13:54










2 Answers
2






active

oldest

votes

















up vote
0
down vote













This isn't actually an answer, but it was too detailed to be a comment, and may become an answer after more information is determined.



When I read your post, I thought you were using your lan ip address (internal ip address), but after comparing the results of your commands vs my own, forcing me to look more closely, I see that you are trying to use an external public ip address.



This situation results in more variables and more complexity.



Are you using the actual ip address (xxx.xxx.xxx.xxx), or the domain name?



Is "mydev.testdomain.bg.org" the actual domain name? I don't see this in the registry at all - how are you getting the DNS?



Does your apache configuration file have the ServerName specified in the VirtualHost setup in /etc/apache2/sites-enabled?



What sort of system is this hosted on? I've seen situations with certain routers where you couldn't access a local site from the local machine using the external public ip (for example, Comcast's router).



EDIT: Also, when you make changes to your configuration, as suggested by people who may or may not have a clue about what they are suggesting, and the change does not solve your problem, do you go back and undo the change to restore the original configuration? You should either do that, or keep very good records about all the changes you've made.






share|improve this answer























  • I'm in fact not using a public IP addy. It's just an internal address. The domain name I listed is just a fudge domain. I'm using the IP Address.... the config file doesn't have a ServerName variable defined. The machine is just a ubuntu 64 bit desktop. This is just a test system.
    – dot
    Dec 1 '14 at 18:13










  • @dot: So, why the confusing data? How did you determine the ip address?
    – Marty Fried
    Dec 1 '14 at 20:05










  • I did an ifconfig to get the IP address. Can you expand on why you think it's using an external address - just to put me on the same page? Thanks!
    – dot
    Dec 2 '14 at 18:07










  • @dot: Mostly, I was fooled by your data,where you used an external domain name. I'm not an expert on ip addresses, so it may be a local address, but I'm used to seeing either 192.168.x.x or 10.0.x.x. I wasn't sure, so that's why I asked.
    – Marty Fried
    Dec 2 '14 at 21:43






  • 1




    @Marty. Any address starting with 10.x.x.x is a private address. It is actually written 10.0.0.0/8, but that is usually divided into networks with 10.x.x.0./24. Same for 192.168.0.0/16, which is usually divided in smaller 192.168.x.0/24 nets.
    – Anders
    Dec 5 '14 at 20:23




















up vote
0
down vote













If you are using a VM, just try restarting it!!



I had the exact same problem with the same configurations you had in a fresh install of Ubuntu. localhost was working but nothing else. A restart solved it for me.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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',
    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%2faskubuntu.com%2fquestions%2f554050%2fapache2-on-ubuntu-14-localhost-works-but-ip-doesnt%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    This isn't actually an answer, but it was too detailed to be a comment, and may become an answer after more information is determined.



    When I read your post, I thought you were using your lan ip address (internal ip address), but after comparing the results of your commands vs my own, forcing me to look more closely, I see that you are trying to use an external public ip address.



    This situation results in more variables and more complexity.



    Are you using the actual ip address (xxx.xxx.xxx.xxx), or the domain name?



    Is "mydev.testdomain.bg.org" the actual domain name? I don't see this in the registry at all - how are you getting the DNS?



    Does your apache configuration file have the ServerName specified in the VirtualHost setup in /etc/apache2/sites-enabled?



    What sort of system is this hosted on? I've seen situations with certain routers where you couldn't access a local site from the local machine using the external public ip (for example, Comcast's router).



    EDIT: Also, when you make changes to your configuration, as suggested by people who may or may not have a clue about what they are suggesting, and the change does not solve your problem, do you go back and undo the change to restore the original configuration? You should either do that, or keep very good records about all the changes you've made.






    share|improve this answer























    • I'm in fact not using a public IP addy. It's just an internal address. The domain name I listed is just a fudge domain. I'm using the IP Address.... the config file doesn't have a ServerName variable defined. The machine is just a ubuntu 64 bit desktop. This is just a test system.
      – dot
      Dec 1 '14 at 18:13










    • @dot: So, why the confusing data? How did you determine the ip address?
      – Marty Fried
      Dec 1 '14 at 20:05










    • I did an ifconfig to get the IP address. Can you expand on why you think it's using an external address - just to put me on the same page? Thanks!
      – dot
      Dec 2 '14 at 18:07










    • @dot: Mostly, I was fooled by your data,where you used an external domain name. I'm not an expert on ip addresses, so it may be a local address, but I'm used to seeing either 192.168.x.x or 10.0.x.x. I wasn't sure, so that's why I asked.
      – Marty Fried
      Dec 2 '14 at 21:43






    • 1




      @Marty. Any address starting with 10.x.x.x is a private address. It is actually written 10.0.0.0/8, but that is usually divided into networks with 10.x.x.0./24. Same for 192.168.0.0/16, which is usually divided in smaller 192.168.x.0/24 nets.
      – Anders
      Dec 5 '14 at 20:23

















    up vote
    0
    down vote













    This isn't actually an answer, but it was too detailed to be a comment, and may become an answer after more information is determined.



    When I read your post, I thought you were using your lan ip address (internal ip address), but after comparing the results of your commands vs my own, forcing me to look more closely, I see that you are trying to use an external public ip address.



    This situation results in more variables and more complexity.



    Are you using the actual ip address (xxx.xxx.xxx.xxx), or the domain name?



    Is "mydev.testdomain.bg.org" the actual domain name? I don't see this in the registry at all - how are you getting the DNS?



    Does your apache configuration file have the ServerName specified in the VirtualHost setup in /etc/apache2/sites-enabled?



    What sort of system is this hosted on? I've seen situations with certain routers where you couldn't access a local site from the local machine using the external public ip (for example, Comcast's router).



    EDIT: Also, when you make changes to your configuration, as suggested by people who may or may not have a clue about what they are suggesting, and the change does not solve your problem, do you go back and undo the change to restore the original configuration? You should either do that, or keep very good records about all the changes you've made.






    share|improve this answer























    • I'm in fact not using a public IP addy. It's just an internal address. The domain name I listed is just a fudge domain. I'm using the IP Address.... the config file doesn't have a ServerName variable defined. The machine is just a ubuntu 64 bit desktop. This is just a test system.
      – dot
      Dec 1 '14 at 18:13










    • @dot: So, why the confusing data? How did you determine the ip address?
      – Marty Fried
      Dec 1 '14 at 20:05










    • I did an ifconfig to get the IP address. Can you expand on why you think it's using an external address - just to put me on the same page? Thanks!
      – dot
      Dec 2 '14 at 18:07










    • @dot: Mostly, I was fooled by your data,where you used an external domain name. I'm not an expert on ip addresses, so it may be a local address, but I'm used to seeing either 192.168.x.x or 10.0.x.x. I wasn't sure, so that's why I asked.
      – Marty Fried
      Dec 2 '14 at 21:43






    • 1




      @Marty. Any address starting with 10.x.x.x is a private address. It is actually written 10.0.0.0/8, but that is usually divided into networks with 10.x.x.0./24. Same for 192.168.0.0/16, which is usually divided in smaller 192.168.x.0/24 nets.
      – Anders
      Dec 5 '14 at 20:23















    up vote
    0
    down vote










    up vote
    0
    down vote









    This isn't actually an answer, but it was too detailed to be a comment, and may become an answer after more information is determined.



    When I read your post, I thought you were using your lan ip address (internal ip address), but after comparing the results of your commands vs my own, forcing me to look more closely, I see that you are trying to use an external public ip address.



    This situation results in more variables and more complexity.



    Are you using the actual ip address (xxx.xxx.xxx.xxx), or the domain name?



    Is "mydev.testdomain.bg.org" the actual domain name? I don't see this in the registry at all - how are you getting the DNS?



    Does your apache configuration file have the ServerName specified in the VirtualHost setup in /etc/apache2/sites-enabled?



    What sort of system is this hosted on? I've seen situations with certain routers where you couldn't access a local site from the local machine using the external public ip (for example, Comcast's router).



    EDIT: Also, when you make changes to your configuration, as suggested by people who may or may not have a clue about what they are suggesting, and the change does not solve your problem, do you go back and undo the change to restore the original configuration? You should either do that, or keep very good records about all the changes you've made.






    share|improve this answer














    This isn't actually an answer, but it was too detailed to be a comment, and may become an answer after more information is determined.



    When I read your post, I thought you were using your lan ip address (internal ip address), but after comparing the results of your commands vs my own, forcing me to look more closely, I see that you are trying to use an external public ip address.



    This situation results in more variables and more complexity.



    Are you using the actual ip address (xxx.xxx.xxx.xxx), or the domain name?



    Is "mydev.testdomain.bg.org" the actual domain name? I don't see this in the registry at all - how are you getting the DNS?



    Does your apache configuration file have the ServerName specified in the VirtualHost setup in /etc/apache2/sites-enabled?



    What sort of system is this hosted on? I've seen situations with certain routers where you couldn't access a local site from the local machine using the external public ip (for example, Comcast's router).



    EDIT: Also, when you make changes to your configuration, as suggested by people who may or may not have a clue about what they are suggesting, and the change does not solve your problem, do you go back and undo the change to restore the original configuration? You should either do that, or keep very good records about all the changes you've made.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 1 '14 at 20:07

























    answered Dec 1 '14 at 16:55









    Marty Fried

    13.3k53746




    13.3k53746












    • I'm in fact not using a public IP addy. It's just an internal address. The domain name I listed is just a fudge domain. I'm using the IP Address.... the config file doesn't have a ServerName variable defined. The machine is just a ubuntu 64 bit desktop. This is just a test system.
      – dot
      Dec 1 '14 at 18:13










    • @dot: So, why the confusing data? How did you determine the ip address?
      – Marty Fried
      Dec 1 '14 at 20:05










    • I did an ifconfig to get the IP address. Can you expand on why you think it's using an external address - just to put me on the same page? Thanks!
      – dot
      Dec 2 '14 at 18:07










    • @dot: Mostly, I was fooled by your data,where you used an external domain name. I'm not an expert on ip addresses, so it may be a local address, but I'm used to seeing either 192.168.x.x or 10.0.x.x. I wasn't sure, so that's why I asked.
      – Marty Fried
      Dec 2 '14 at 21:43






    • 1




      @Marty. Any address starting with 10.x.x.x is a private address. It is actually written 10.0.0.0/8, but that is usually divided into networks with 10.x.x.0./24. Same for 192.168.0.0/16, which is usually divided in smaller 192.168.x.0/24 nets.
      – Anders
      Dec 5 '14 at 20:23




















    • I'm in fact not using a public IP addy. It's just an internal address. The domain name I listed is just a fudge domain. I'm using the IP Address.... the config file doesn't have a ServerName variable defined. The machine is just a ubuntu 64 bit desktop. This is just a test system.
      – dot
      Dec 1 '14 at 18:13










    • @dot: So, why the confusing data? How did you determine the ip address?
      – Marty Fried
      Dec 1 '14 at 20:05










    • I did an ifconfig to get the IP address. Can you expand on why you think it's using an external address - just to put me on the same page? Thanks!
      – dot
      Dec 2 '14 at 18:07










    • @dot: Mostly, I was fooled by your data,where you used an external domain name. I'm not an expert on ip addresses, so it may be a local address, but I'm used to seeing either 192.168.x.x or 10.0.x.x. I wasn't sure, so that's why I asked.
      – Marty Fried
      Dec 2 '14 at 21:43






    • 1




      @Marty. Any address starting with 10.x.x.x is a private address. It is actually written 10.0.0.0/8, but that is usually divided into networks with 10.x.x.0./24. Same for 192.168.0.0/16, which is usually divided in smaller 192.168.x.0/24 nets.
      – Anders
      Dec 5 '14 at 20:23


















    I'm in fact not using a public IP addy. It's just an internal address. The domain name I listed is just a fudge domain. I'm using the IP Address.... the config file doesn't have a ServerName variable defined. The machine is just a ubuntu 64 bit desktop. This is just a test system.
    – dot
    Dec 1 '14 at 18:13




    I'm in fact not using a public IP addy. It's just an internal address. The domain name I listed is just a fudge domain. I'm using the IP Address.... the config file doesn't have a ServerName variable defined. The machine is just a ubuntu 64 bit desktop. This is just a test system.
    – dot
    Dec 1 '14 at 18:13












    @dot: So, why the confusing data? How did you determine the ip address?
    – Marty Fried
    Dec 1 '14 at 20:05




    @dot: So, why the confusing data? How did you determine the ip address?
    – Marty Fried
    Dec 1 '14 at 20:05












    I did an ifconfig to get the IP address. Can you expand on why you think it's using an external address - just to put me on the same page? Thanks!
    – dot
    Dec 2 '14 at 18:07




    I did an ifconfig to get the IP address. Can you expand on why you think it's using an external address - just to put me on the same page? Thanks!
    – dot
    Dec 2 '14 at 18:07












    @dot: Mostly, I was fooled by your data,where you used an external domain name. I'm not an expert on ip addresses, so it may be a local address, but I'm used to seeing either 192.168.x.x or 10.0.x.x. I wasn't sure, so that's why I asked.
    – Marty Fried
    Dec 2 '14 at 21:43




    @dot: Mostly, I was fooled by your data,where you used an external domain name. I'm not an expert on ip addresses, so it may be a local address, but I'm used to seeing either 192.168.x.x or 10.0.x.x. I wasn't sure, so that's why I asked.
    – Marty Fried
    Dec 2 '14 at 21:43




    1




    1




    @Marty. Any address starting with 10.x.x.x is a private address. It is actually written 10.0.0.0/8, but that is usually divided into networks with 10.x.x.0./24. Same for 192.168.0.0/16, which is usually divided in smaller 192.168.x.0/24 nets.
    – Anders
    Dec 5 '14 at 20:23






    @Marty. Any address starting with 10.x.x.x is a private address. It is actually written 10.0.0.0/8, but that is usually divided into networks with 10.x.x.0./24. Same for 192.168.0.0/16, which is usually divided in smaller 192.168.x.0/24 nets.
    – Anders
    Dec 5 '14 at 20:23














    up vote
    0
    down vote













    If you are using a VM, just try restarting it!!



    I had the exact same problem with the same configurations you had in a fresh install of Ubuntu. localhost was working but nothing else. A restart solved it for me.






    share|improve this answer

























      up vote
      0
      down vote













      If you are using a VM, just try restarting it!!



      I had the exact same problem with the same configurations you had in a fresh install of Ubuntu. localhost was working but nothing else. A restart solved it for me.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        If you are using a VM, just try restarting it!!



        I had the exact same problem with the same configurations you had in a fresh install of Ubuntu. localhost was working but nothing else. A restart solved it for me.






        share|improve this answer












        If you are using a VM, just try restarting it!!



        I had the exact same problem with the same configurations you had in a fresh install of Ubuntu. localhost was working but nothing else. A restart solved it for me.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 1 '17 at 8:50









        Faisal M

        412




        412






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f554050%2fapache2-on-ubuntu-14-localhost-works-but-ip-doesnt%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

            flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

            Mangá

            Eduardo VII do Reino Unido