Cannot access Apache start page via “localhost” in web browser












0















I had the LAMP stack installed on my Ubuntu machine. Everything was working fine. I had Apache, mySql, phpmyadmin, etc. I'm learning web development, and a friend suggested I try out Drupal. So, I downloaded the tar package, extracted it, began the setup process via an online tutorial, and I kept getting the error "the Settings file is not writable". I went through everything I could think of to change the permissions to no avail. I also downloaded openssh, but had trouble logging in. That was next on the list to uninstall.



I became frustrated thinking I had done something wrong during installation, so I deleted everything I had installed: Apache, php, mysql, and drupal. I believe I got any leftovers taken care of.



Well, I restarted the process and got Apache downloaded, but when I try my I.P. or "localhost," I get the error "this site can't be reached." HOWEVER, if I navigate to the physical folder /var/www/html/index.html, and double click, the Apache "it works!" page comes up.



I wish I could take the snapshot of my computer two days ago and forget this ever happened because one seemingly simple download has caused me nothing but headache.



Any ideas on where I can start to fix my broken machine?










share|improve this question



























    0















    I had the LAMP stack installed on my Ubuntu machine. Everything was working fine. I had Apache, mySql, phpmyadmin, etc. I'm learning web development, and a friend suggested I try out Drupal. So, I downloaded the tar package, extracted it, began the setup process via an online tutorial, and I kept getting the error "the Settings file is not writable". I went through everything I could think of to change the permissions to no avail. I also downloaded openssh, but had trouble logging in. That was next on the list to uninstall.



    I became frustrated thinking I had done something wrong during installation, so I deleted everything I had installed: Apache, php, mysql, and drupal. I believe I got any leftovers taken care of.



    Well, I restarted the process and got Apache downloaded, but when I try my I.P. or "localhost," I get the error "this site can't be reached." HOWEVER, if I navigate to the physical folder /var/www/html/index.html, and double click, the Apache "it works!" page comes up.



    I wish I could take the snapshot of my computer two days ago and forget this ever happened because one seemingly simple download has caused me nothing but headache.



    Any ideas on where I can start to fix my broken machine?










    share|improve this question

























      0












      0








      0








      I had the LAMP stack installed on my Ubuntu machine. Everything was working fine. I had Apache, mySql, phpmyadmin, etc. I'm learning web development, and a friend suggested I try out Drupal. So, I downloaded the tar package, extracted it, began the setup process via an online tutorial, and I kept getting the error "the Settings file is not writable". I went through everything I could think of to change the permissions to no avail. I also downloaded openssh, but had trouble logging in. That was next on the list to uninstall.



      I became frustrated thinking I had done something wrong during installation, so I deleted everything I had installed: Apache, php, mysql, and drupal. I believe I got any leftovers taken care of.



      Well, I restarted the process and got Apache downloaded, but when I try my I.P. or "localhost," I get the error "this site can't be reached." HOWEVER, if I navigate to the physical folder /var/www/html/index.html, and double click, the Apache "it works!" page comes up.



      I wish I could take the snapshot of my computer two days ago and forget this ever happened because one seemingly simple download has caused me nothing but headache.



      Any ideas on where I can start to fix my broken machine?










      share|improve this question














      I had the LAMP stack installed on my Ubuntu machine. Everything was working fine. I had Apache, mySql, phpmyadmin, etc. I'm learning web development, and a friend suggested I try out Drupal. So, I downloaded the tar package, extracted it, began the setup process via an online tutorial, and I kept getting the error "the Settings file is not writable". I went through everything I could think of to change the permissions to no avail. I also downloaded openssh, but had trouble logging in. That was next on the list to uninstall.



      I became frustrated thinking I had done something wrong during installation, so I deleted everything I had installed: Apache, php, mysql, and drupal. I believe I got any leftovers taken care of.



      Well, I restarted the process and got Apache downloaded, but when I try my I.P. or "localhost," I get the error "this site can't be reached." HOWEVER, if I navigate to the physical folder /var/www/html/index.html, and double click, the Apache "it works!" page comes up.



      I wish I could take the snapshot of my computer two days ago and forget this ever happened because one seemingly simple download has caused me nothing but headache.



      Any ideas on where I can start to fix my broken machine?







      apache2 16.04 web-development drupal






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 2 '16 at 17:27









      IRGeekSauceIRGeekSauce

      1561110




      1561110






















          3 Answers
          3






          active

          oldest

          votes


















          1














          I've added the url to /etc/hosts the issue is resolved. such as (wpfa.dev):



          127.0.0.1       localhost
          127.0.3.1 wpfa.dev
          # The following lines are desirable for IPv6 capable hosts
          ::1 ip6-localhost ip6-loopback
          fe00::0 ip6-localnet
          ff00::0 ip6-mcastprefix
          ff02::1 ip6-allnodes
          ff02::2 ip6-allrouters





          share|improve this answer































            2














            OK, there are ways to do that, the first you have to do is to reload configuration:



            sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/*.conf


            After that use next commands:



            sudo service apache2 reload
            sudo service apache2 restart


            Make sure default folder is owned by web server, to change permissions use next commands:



            sudo chown -R www-data:www-data /var/www/html
            sudo chmod -R 755 /var/www/html
            sudo service apache2 restart


            Also if you had enabled ufw, that use command next command to allow HTTP(HTTPS):



            sudo ufw allow 80
            #for HTTPS use 443 instead of 80


            But if this don't work, then you must reinstall completely apache2 using command:



            sudo apt-get remove --purge apache2
            sudo apt-get install apache2





            share|improve this answer


























            • That didn't work. Going with last step. Also, I don't know what "ufw" means.

              – IRGeekSauce
              Apr 2 '16 at 18:20











            • Ok. Tried the reinstall. Still didn't work.

              – IRGeekSauce
              Apr 2 '16 at 18:23











            • @IRGeekSauce ufw is firewall, uncomplicated firewall, installed on ubuntu.

              – Zviad Gabroshvili
              Apr 2 '16 at 18:23











            • Have you tried to access your server using internal IP?

              – Zviad Gabroshvili
              Apr 2 '16 at 18:25











            • Please, give me the link of tutorial.

              – Zviad Gabroshvili
              Apr 2 '16 at 18:28



















            0














            Try to start apache2 by this command:



            sudo service apache2 start





            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',
              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%2f753101%2fcannot-access-apache-start-page-via-localhost-in-web-browser%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              I've added the url to /etc/hosts the issue is resolved. such as (wpfa.dev):



              127.0.0.1       localhost
              127.0.3.1 wpfa.dev
              # The following lines are desirable for IPv6 capable hosts
              ::1 ip6-localhost ip6-loopback
              fe00::0 ip6-localnet
              ff00::0 ip6-mcastprefix
              ff02::1 ip6-allnodes
              ff02::2 ip6-allrouters





              share|improve this answer




























                1














                I've added the url to /etc/hosts the issue is resolved. such as (wpfa.dev):



                127.0.0.1       localhost
                127.0.3.1 wpfa.dev
                # The following lines are desirable for IPv6 capable hosts
                ::1 ip6-localhost ip6-loopback
                fe00::0 ip6-localnet
                ff00::0 ip6-mcastprefix
                ff02::1 ip6-allnodes
                ff02::2 ip6-allrouters





                share|improve this answer


























                  1












                  1








                  1







                  I've added the url to /etc/hosts the issue is resolved. such as (wpfa.dev):



                  127.0.0.1       localhost
                  127.0.3.1 wpfa.dev
                  # The following lines are desirable for IPv6 capable hosts
                  ::1 ip6-localhost ip6-loopback
                  fe00::0 ip6-localnet
                  ff00::0 ip6-mcastprefix
                  ff02::1 ip6-allnodes
                  ff02::2 ip6-allrouters





                  share|improve this answer













                  I've added the url to /etc/hosts the issue is resolved. such as (wpfa.dev):



                  127.0.0.1       localhost
                  127.0.3.1 wpfa.dev
                  # The following lines are desirable for IPv6 capable hosts
                  ::1 ip6-localhost ip6-loopback
                  fe00::0 ip6-localnet
                  ff00::0 ip6-mcastprefix
                  ff02::1 ip6-allnodes
                  ff02::2 ip6-allrouters






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 28 '17 at 17:38









                  Ali HesariAli Hesari

                  3121614




                  3121614

























                      2














                      OK, there are ways to do that, the first you have to do is to reload configuration:



                      sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/*.conf


                      After that use next commands:



                      sudo service apache2 reload
                      sudo service apache2 restart


                      Make sure default folder is owned by web server, to change permissions use next commands:



                      sudo chown -R www-data:www-data /var/www/html
                      sudo chmod -R 755 /var/www/html
                      sudo service apache2 restart


                      Also if you had enabled ufw, that use command next command to allow HTTP(HTTPS):



                      sudo ufw allow 80
                      #for HTTPS use 443 instead of 80


                      But if this don't work, then you must reinstall completely apache2 using command:



                      sudo apt-get remove --purge apache2
                      sudo apt-get install apache2





                      share|improve this answer


























                      • That didn't work. Going with last step. Also, I don't know what "ufw" means.

                        – IRGeekSauce
                        Apr 2 '16 at 18:20











                      • Ok. Tried the reinstall. Still didn't work.

                        – IRGeekSauce
                        Apr 2 '16 at 18:23











                      • @IRGeekSauce ufw is firewall, uncomplicated firewall, installed on ubuntu.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:23











                      • Have you tried to access your server using internal IP?

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:25











                      • Please, give me the link of tutorial.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:28
















                      2














                      OK, there are ways to do that, the first you have to do is to reload configuration:



                      sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/*.conf


                      After that use next commands:



                      sudo service apache2 reload
                      sudo service apache2 restart


                      Make sure default folder is owned by web server, to change permissions use next commands:



                      sudo chown -R www-data:www-data /var/www/html
                      sudo chmod -R 755 /var/www/html
                      sudo service apache2 restart


                      Also if you had enabled ufw, that use command next command to allow HTTP(HTTPS):



                      sudo ufw allow 80
                      #for HTTPS use 443 instead of 80


                      But if this don't work, then you must reinstall completely apache2 using command:



                      sudo apt-get remove --purge apache2
                      sudo apt-get install apache2





                      share|improve this answer


























                      • That didn't work. Going with last step. Also, I don't know what "ufw" means.

                        – IRGeekSauce
                        Apr 2 '16 at 18:20











                      • Ok. Tried the reinstall. Still didn't work.

                        – IRGeekSauce
                        Apr 2 '16 at 18:23











                      • @IRGeekSauce ufw is firewall, uncomplicated firewall, installed on ubuntu.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:23











                      • Have you tried to access your server using internal IP?

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:25











                      • Please, give me the link of tutorial.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:28














                      2












                      2








                      2







                      OK, there are ways to do that, the first you have to do is to reload configuration:



                      sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/*.conf


                      After that use next commands:



                      sudo service apache2 reload
                      sudo service apache2 restart


                      Make sure default folder is owned by web server, to change permissions use next commands:



                      sudo chown -R www-data:www-data /var/www/html
                      sudo chmod -R 755 /var/www/html
                      sudo service apache2 restart


                      Also if you had enabled ufw, that use command next command to allow HTTP(HTTPS):



                      sudo ufw allow 80
                      #for HTTPS use 443 instead of 80


                      But if this don't work, then you must reinstall completely apache2 using command:



                      sudo apt-get remove --purge apache2
                      sudo apt-get install apache2





                      share|improve this answer















                      OK, there are ways to do that, the first you have to do is to reload configuration:



                      sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/*.conf


                      After that use next commands:



                      sudo service apache2 reload
                      sudo service apache2 restart


                      Make sure default folder is owned by web server, to change permissions use next commands:



                      sudo chown -R www-data:www-data /var/www/html
                      sudo chmod -R 755 /var/www/html
                      sudo service apache2 restart


                      Also if you had enabled ufw, that use command next command to allow HTTP(HTTPS):



                      sudo ufw allow 80
                      #for HTTPS use 443 instead of 80


                      But if this don't work, then you must reinstall completely apache2 using command:



                      sudo apt-get remove --purge apache2
                      sudo apt-get install apache2






                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited May 18 '16 at 18:05









                      Gallaoui

                      1032




                      1032










                      answered Apr 2 '16 at 17:57









                      Zviad GabroshviliZviad Gabroshvili

                      478413




                      478413













                      • That didn't work. Going with last step. Also, I don't know what "ufw" means.

                        – IRGeekSauce
                        Apr 2 '16 at 18:20











                      • Ok. Tried the reinstall. Still didn't work.

                        – IRGeekSauce
                        Apr 2 '16 at 18:23











                      • @IRGeekSauce ufw is firewall, uncomplicated firewall, installed on ubuntu.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:23











                      • Have you tried to access your server using internal IP?

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:25











                      • Please, give me the link of tutorial.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:28



















                      • That didn't work. Going with last step. Also, I don't know what "ufw" means.

                        – IRGeekSauce
                        Apr 2 '16 at 18:20











                      • Ok. Tried the reinstall. Still didn't work.

                        – IRGeekSauce
                        Apr 2 '16 at 18:23











                      • @IRGeekSauce ufw is firewall, uncomplicated firewall, installed on ubuntu.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:23











                      • Have you tried to access your server using internal IP?

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:25











                      • Please, give me the link of tutorial.

                        – Zviad Gabroshvili
                        Apr 2 '16 at 18:28

















                      That didn't work. Going with last step. Also, I don't know what "ufw" means.

                      – IRGeekSauce
                      Apr 2 '16 at 18:20





                      That didn't work. Going with last step. Also, I don't know what "ufw" means.

                      – IRGeekSauce
                      Apr 2 '16 at 18:20













                      Ok. Tried the reinstall. Still didn't work.

                      – IRGeekSauce
                      Apr 2 '16 at 18:23





                      Ok. Tried the reinstall. Still didn't work.

                      – IRGeekSauce
                      Apr 2 '16 at 18:23













                      @IRGeekSauce ufw is firewall, uncomplicated firewall, installed on ubuntu.

                      – Zviad Gabroshvili
                      Apr 2 '16 at 18:23





                      @IRGeekSauce ufw is firewall, uncomplicated firewall, installed on ubuntu.

                      – Zviad Gabroshvili
                      Apr 2 '16 at 18:23













                      Have you tried to access your server using internal IP?

                      – Zviad Gabroshvili
                      Apr 2 '16 at 18:25





                      Have you tried to access your server using internal IP?

                      – Zviad Gabroshvili
                      Apr 2 '16 at 18:25













                      Please, give me the link of tutorial.

                      – Zviad Gabroshvili
                      Apr 2 '16 at 18:28





                      Please, give me the link of tutorial.

                      – Zviad Gabroshvili
                      Apr 2 '16 at 18:28











                      0














                      Try to start apache2 by this command:



                      sudo service apache2 start





                      share|improve this answer




























                        0














                        Try to start apache2 by this command:



                        sudo service apache2 start





                        share|improve this answer


























                          0












                          0








                          0







                          Try to start apache2 by this command:



                          sudo service apache2 start





                          share|improve this answer













                          Try to start apache2 by this command:



                          sudo service apache2 start






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 23 at 4:18









                          K4y31K4y31

                          1




                          1






























                              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%2f753101%2fcannot-access-apache-start-page-via-localhost-in-web-browser%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

                              How to make a Squid Proxy server?

                              Is this a new Fibonacci Identity?

                              19世紀