Setting up Apache2 to be accessible from anywhere












1















So, I am pretty new to Apache, haven’t used it very much. But I’m trying to setup a website with it on a raspberry pi. I’ve done
Apt-get install apache2 and modified the index.html file in /var/www/html to have a little plain text for testing purposes.
I’ve also forwarded port 80 on my router to my pi.
When I’m on my WAN I can access the site fine by typing my external IP, but as soon as I go on cellular or a friend’s WiFi I can no longer access the site. Not totally sure what I’m missing. Sorry if it’s a rookie mistake










share|improve this question





























    1















    So, I am pretty new to Apache, haven’t used it very much. But I’m trying to setup a website with it on a raspberry pi. I’ve done
    Apt-get install apache2 and modified the index.html file in /var/www/html to have a little plain text for testing purposes.
    I’ve also forwarded port 80 on my router to my pi.
    When I’m on my WAN I can access the site fine by typing my external IP, but as soon as I go on cellular or a friend’s WiFi I can no longer access the site. Not totally sure what I’m missing. Sorry if it’s a rookie mistake










    share|improve this question



























      1












      1








      1


      1






      So, I am pretty new to Apache, haven’t used it very much. But I’m trying to setup a website with it on a raspberry pi. I’ve done
      Apt-get install apache2 and modified the index.html file in /var/www/html to have a little plain text for testing purposes.
      I’ve also forwarded port 80 on my router to my pi.
      When I’m on my WAN I can access the site fine by typing my external IP, but as soon as I go on cellular or a friend’s WiFi I can no longer access the site. Not totally sure what I’m missing. Sorry if it’s a rookie mistake










      share|improve this question
















      So, I am pretty new to Apache, haven’t used it very much. But I’m trying to setup a website with it on a raspberry pi. I’ve done
      Apt-get install apache2 and modified the index.html file in /var/www/html to have a little plain text for testing purposes.
      I’ve also forwarded port 80 on my router to my pi.
      When I’m on my WAN I can access the site fine by typing my external IP, but as soon as I go on cellular or a friend’s WiFi I can no longer access the site. Not totally sure what I’m missing. Sorry if it’s a rookie mistake







      apache2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 8 at 6:12









      vidarlo

      10.8k52748




      10.8k52748










      asked Feb 8 at 3:37









      Tech_PersonTech_Person

      419




      419






















          1 Answer
          1






          active

          oldest

          votes


















          1














          It's likely that your ISP is blocking port 80 if you are on a residential line. The vast majority of ISP's will block a set of specific ports for a number of reasons including safety (cut down on unlisted websites that might be doing illegitimate things), convenience (keep bandwidth open for other traffic) and "because they can". This will not affect traffic from within your network, however it will prevent virtually any outside connections from using your public IP address SPECIFICALLY on port 80.



          I have a webserver and my solution to this problem is to change the default port. You can do this in a couple of ways.




          1. On your router:
            Instead of forwarding port 80 to 80, forward port 60123 to 80, or something similar. This will make your router listen on a non-standard port and forward anything it hears to your raspberry pi on the appropriate port.


          2. On your raspberry pi AND your router:
            in /etc/apache2 modify the ports.conf file and change port 80 to something else (preferrably above 1024 to avoid getting blocked). Then update your router to this new port, and you should be fine.



          Once changed, you'll need to append the port number to your IP address whenever you type it into your web browser, including using simply localhost



          eg: http://localhost:10123, http://192.168.1.3:12345






          share|improve this answer
























          • I seen this a few times in researching it and didn’t understand what it meant, thankyou for clarifying how to do it! It works perfectly now

            – Tech_Person
            Feb 8 at 5:43











          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',
          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%2faskubuntu.com%2fquestions%2f1116559%2fsetting-up-apache2-to-be-accessible-from-anywhere%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









          1














          It's likely that your ISP is blocking port 80 if you are on a residential line. The vast majority of ISP's will block a set of specific ports for a number of reasons including safety (cut down on unlisted websites that might be doing illegitimate things), convenience (keep bandwidth open for other traffic) and "because they can". This will not affect traffic from within your network, however it will prevent virtually any outside connections from using your public IP address SPECIFICALLY on port 80.



          I have a webserver and my solution to this problem is to change the default port. You can do this in a couple of ways.




          1. On your router:
            Instead of forwarding port 80 to 80, forward port 60123 to 80, or something similar. This will make your router listen on a non-standard port and forward anything it hears to your raspberry pi on the appropriate port.


          2. On your raspberry pi AND your router:
            in /etc/apache2 modify the ports.conf file and change port 80 to something else (preferrably above 1024 to avoid getting blocked). Then update your router to this new port, and you should be fine.



          Once changed, you'll need to append the port number to your IP address whenever you type it into your web browser, including using simply localhost



          eg: http://localhost:10123, http://192.168.1.3:12345






          share|improve this answer
























          • I seen this a few times in researching it and didn’t understand what it meant, thankyou for clarifying how to do it! It works perfectly now

            – Tech_Person
            Feb 8 at 5:43
















          1














          It's likely that your ISP is blocking port 80 if you are on a residential line. The vast majority of ISP's will block a set of specific ports for a number of reasons including safety (cut down on unlisted websites that might be doing illegitimate things), convenience (keep bandwidth open for other traffic) and "because they can". This will not affect traffic from within your network, however it will prevent virtually any outside connections from using your public IP address SPECIFICALLY on port 80.



          I have a webserver and my solution to this problem is to change the default port. You can do this in a couple of ways.




          1. On your router:
            Instead of forwarding port 80 to 80, forward port 60123 to 80, or something similar. This will make your router listen on a non-standard port and forward anything it hears to your raspberry pi on the appropriate port.


          2. On your raspberry pi AND your router:
            in /etc/apache2 modify the ports.conf file and change port 80 to something else (preferrably above 1024 to avoid getting blocked). Then update your router to this new port, and you should be fine.



          Once changed, you'll need to append the port number to your IP address whenever you type it into your web browser, including using simply localhost



          eg: http://localhost:10123, http://192.168.1.3:12345






          share|improve this answer
























          • I seen this a few times in researching it and didn’t understand what it meant, thankyou for clarifying how to do it! It works perfectly now

            – Tech_Person
            Feb 8 at 5:43














          1












          1








          1







          It's likely that your ISP is blocking port 80 if you are on a residential line. The vast majority of ISP's will block a set of specific ports for a number of reasons including safety (cut down on unlisted websites that might be doing illegitimate things), convenience (keep bandwidth open for other traffic) and "because they can". This will not affect traffic from within your network, however it will prevent virtually any outside connections from using your public IP address SPECIFICALLY on port 80.



          I have a webserver and my solution to this problem is to change the default port. You can do this in a couple of ways.




          1. On your router:
            Instead of forwarding port 80 to 80, forward port 60123 to 80, or something similar. This will make your router listen on a non-standard port and forward anything it hears to your raspberry pi on the appropriate port.


          2. On your raspberry pi AND your router:
            in /etc/apache2 modify the ports.conf file and change port 80 to something else (preferrably above 1024 to avoid getting blocked). Then update your router to this new port, and you should be fine.



          Once changed, you'll need to append the port number to your IP address whenever you type it into your web browser, including using simply localhost



          eg: http://localhost:10123, http://192.168.1.3:12345






          share|improve this answer













          It's likely that your ISP is blocking port 80 if you are on a residential line. The vast majority of ISP's will block a set of specific ports for a number of reasons including safety (cut down on unlisted websites that might be doing illegitimate things), convenience (keep bandwidth open for other traffic) and "because they can". This will not affect traffic from within your network, however it will prevent virtually any outside connections from using your public IP address SPECIFICALLY on port 80.



          I have a webserver and my solution to this problem is to change the default port. You can do this in a couple of ways.




          1. On your router:
            Instead of forwarding port 80 to 80, forward port 60123 to 80, or something similar. This will make your router listen on a non-standard port and forward anything it hears to your raspberry pi on the appropriate port.


          2. On your raspberry pi AND your router:
            in /etc/apache2 modify the ports.conf file and change port 80 to something else (preferrably above 1024 to avoid getting blocked). Then update your router to this new port, and you should be fine.



          Once changed, you'll need to append the port number to your IP address whenever you type it into your web browser, including using simply localhost



          eg: http://localhost:10123, http://192.168.1.3:12345







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 8 at 4:28









          MintyMinty

          88328




          88328













          • I seen this a few times in researching it and didn’t understand what it meant, thankyou for clarifying how to do it! It works perfectly now

            – Tech_Person
            Feb 8 at 5:43



















          • I seen this a few times in researching it and didn’t understand what it meant, thankyou for clarifying how to do it! It works perfectly now

            – Tech_Person
            Feb 8 at 5:43

















          I seen this a few times in researching it and didn’t understand what it meant, thankyou for clarifying how to do it! It works perfectly now

          – Tech_Person
          Feb 8 at 5:43





          I seen this a few times in researching it and didn’t understand what it meant, thankyou for clarifying how to do it! It works perfectly now

          – Tech_Person
          Feb 8 at 5:43


















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1116559%2fsetting-up-apache2-to-be-accessible-from-anywhere%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á

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕