Magento 2 Admin 404 Error












0















I just manually installed Magento2 CE on Ubuntu server 18.04 with LAMP via composer, the install went ok and all checks were on green however the link given after installation to access the magento admin page is giving error 404.



To resolve this a few people say it should work by changing from the config:



sudo nano /etc/apache2/apache2.conf


From:



<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>


To



<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>


but is still not working, another tutorials also say to change the file pub/.htaccess to magento root folder which I'm guessing it would be located default on: /var/www/html/magento



However I'm new to Ubuntu commands and I'm unable to find any suggestions of how to do this, would it work with this?



sudo mv /var/www/html/magento/pub/.htaccess /var/www/html/magento


If, I tried it and is not working, any suggestions?? or anyone here who have fixed this issue before??










share|improve this question





























    0















    I just manually installed Magento2 CE on Ubuntu server 18.04 with LAMP via composer, the install went ok and all checks were on green however the link given after installation to access the magento admin page is giving error 404.



    To resolve this a few people say it should work by changing from the config:



    sudo nano /etc/apache2/apache2.conf


    From:



    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
    </Directory>


    To



    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>


    but is still not working, another tutorials also say to change the file pub/.htaccess to magento root folder which I'm guessing it would be located default on: /var/www/html/magento



    However I'm new to Ubuntu commands and I'm unable to find any suggestions of how to do this, would it work with this?



    sudo mv /var/www/html/magento/pub/.htaccess /var/www/html/magento


    If, I tried it and is not working, any suggestions?? or anyone here who have fixed this issue before??










    share|improve this question



























      0












      0








      0








      I just manually installed Magento2 CE on Ubuntu server 18.04 with LAMP via composer, the install went ok and all checks were on green however the link given after installation to access the magento admin page is giving error 404.



      To resolve this a few people say it should work by changing from the config:



      sudo nano /etc/apache2/apache2.conf


      From:



      <Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride None
      Require all granted
      </Directory>


      To



      <Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
      </Directory>


      but is still not working, another tutorials also say to change the file pub/.htaccess to magento root folder which I'm guessing it would be located default on: /var/www/html/magento



      However I'm new to Ubuntu commands and I'm unable to find any suggestions of how to do this, would it work with this?



      sudo mv /var/www/html/magento/pub/.htaccess /var/www/html/magento


      If, I tried it and is not working, any suggestions?? or anyone here who have fixed this issue before??










      share|improve this question
















      I just manually installed Magento2 CE on Ubuntu server 18.04 with LAMP via composer, the install went ok and all checks were on green however the link given after installation to access the magento admin page is giving error 404.



      To resolve this a few people say it should work by changing from the config:



      sudo nano /etc/apache2/apache2.conf


      From:



      <Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride None
      Require all granted
      </Directory>


      To



      <Directory /var/www/>
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
      </Directory>


      but is still not working, another tutorials also say to change the file pub/.htaccess to magento root folder which I'm guessing it would be located default on: /var/www/html/magento



      However I'm new to Ubuntu commands and I'm unable to find any suggestions of how to do this, would it work with this?



      sudo mv /var/www/html/magento/pub/.htaccess /var/www/html/magento


      If, I tried it and is not working, any suggestions?? or anyone here who have fixed this issue before??







      server permissions apache2 php magento






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 26 '18 at 0:00









      Eskander Bejaoui

      1,3281721




      1,3281721










      asked Jun 25 '18 at 14:29









      Eduardo MonterrosoEduardo Monterroso

      1




      1






















          3 Answers
          3






          active

          oldest

          votes


















          0














          You should check the specific VirtualHost to find what is the document root directory, and then set the AllowOverride directive for that directory. For example:



          <Directory /var/www/html/magento/>
          Options Indexes FollowSymLinks
          AllowOverride All
          Require all granted
          </Directory>


          Where /var/www/html/magento is the document root directory of your domain name. You should also make sure that a .htaccess file is created in the same directory.






          share|improve this answer































            0














            If the installation is completely done and Magento admin page is giving error 404, I think this is due to the actual Magento path not set in core_config_data table of database you have created for this.



            So please check these two paths values is valid Magento path or not, if not please change it



            web/unsecure/base_url = http://localhost/training/Magento2.1.7/
            web/secure/base_url = https://localhost/training/Magento2.1.7/


            where training/Magento2.1.7 is my Magento path.






            share|improve this answer

































              0














              Yes, sometimes it happened when we installed Magento 2 and 404 error occured. This error may be one of these:



              Error after installing/upgrading
              Fresh install on Ubuntu
              Page 403 Forbidden errors
              Due to Messy page



              I think you should modify from:



              <Directory /var/www/>
              Options Indexes FollowSymLinks
              AllowOverride None
              Require all granted
              </Directory>


              to:



              <Directory /var/www/>
              Options Indexes FollowSymLinks
              AllowOverride All
              Require all granted
              </Directory>


              Then restart apache. It should work.





              share








              New contributor




              Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                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%2f1049582%2fmagento-2-admin-404-error%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









                0














                You should check the specific VirtualHost to find what is the document root directory, and then set the AllowOverride directive for that directory. For example:



                <Directory /var/www/html/magento/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
                </Directory>


                Where /var/www/html/magento is the document root directory of your domain name. You should also make sure that a .htaccess file is created in the same directory.






                share|improve this answer




























                  0














                  You should check the specific VirtualHost to find what is the document root directory, and then set the AllowOverride directive for that directory. For example:



                  <Directory /var/www/html/magento/>
                  Options Indexes FollowSymLinks
                  AllowOverride All
                  Require all granted
                  </Directory>


                  Where /var/www/html/magento is the document root directory of your domain name. You should also make sure that a .htaccess file is created in the same directory.






                  share|improve this answer


























                    0












                    0








                    0







                    You should check the specific VirtualHost to find what is the document root directory, and then set the AllowOverride directive for that directory. For example:



                    <Directory /var/www/html/magento/>
                    Options Indexes FollowSymLinks
                    AllowOverride All
                    Require all granted
                    </Directory>


                    Where /var/www/html/magento is the document root directory of your domain name. You should also make sure that a .htaccess file is created in the same directory.






                    share|improve this answer













                    You should check the specific VirtualHost to find what is the document root directory, and then set the AllowOverride directive for that directory. For example:



                    <Directory /var/www/html/magento/>
                    Options Indexes FollowSymLinks
                    AllowOverride All
                    Require all granted
                    </Directory>


                    Where /var/www/html/magento is the document root directory of your domain name. You should also make sure that a .htaccess file is created in the same directory.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 27 '18 at 11:01









                    RoseHostingRoseHosting

                    1812




                    1812

























                        0














                        If the installation is completely done and Magento admin page is giving error 404, I think this is due to the actual Magento path not set in core_config_data table of database you have created for this.



                        So please check these two paths values is valid Magento path or not, if not please change it



                        web/unsecure/base_url = http://localhost/training/Magento2.1.7/
                        web/secure/base_url = https://localhost/training/Magento2.1.7/


                        where training/Magento2.1.7 is my Magento path.






                        share|improve this answer






























                          0














                          If the installation is completely done and Magento admin page is giving error 404, I think this is due to the actual Magento path not set in core_config_data table of database you have created for this.



                          So please check these two paths values is valid Magento path or not, if not please change it



                          web/unsecure/base_url = http://localhost/training/Magento2.1.7/
                          web/secure/base_url = https://localhost/training/Magento2.1.7/


                          where training/Magento2.1.7 is my Magento path.






                          share|improve this answer




























                            0












                            0








                            0







                            If the installation is completely done and Magento admin page is giving error 404, I think this is due to the actual Magento path not set in core_config_data table of database you have created for this.



                            So please check these two paths values is valid Magento path or not, if not please change it



                            web/unsecure/base_url = http://localhost/training/Magento2.1.7/
                            web/secure/base_url = https://localhost/training/Magento2.1.7/


                            where training/Magento2.1.7 is my Magento path.






                            share|improve this answer















                            If the installation is completely done and Magento admin page is giving error 404, I think this is due to the actual Magento path not set in core_config_data table of database you have created for this.



                            So please check these two paths values is valid Magento path or not, if not please change it



                            web/unsecure/base_url = http://localhost/training/Magento2.1.7/
                            web/secure/base_url = https://localhost/training/Magento2.1.7/


                            where training/Magento2.1.7 is my Magento path.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Aug 26 '18 at 7:34









                            Thomas

                            3,79981527




                            3,79981527










                            answered Aug 26 '18 at 6:48









                            abhinay pratap singhabhinay pratap singh

                            12




                            12























                                0














                                Yes, sometimes it happened when we installed Magento 2 and 404 error occured. This error may be one of these:



                                Error after installing/upgrading
                                Fresh install on Ubuntu
                                Page 403 Forbidden errors
                                Due to Messy page



                                I think you should modify from:



                                <Directory /var/www/>
                                Options Indexes FollowSymLinks
                                AllowOverride None
                                Require all granted
                                </Directory>


                                to:



                                <Directory /var/www/>
                                Options Indexes FollowSymLinks
                                AllowOverride All
                                Require all granted
                                </Directory>


                                Then restart apache. It should work.





                                share








                                New contributor




                                Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                Check out our Code of Conduct.

























                                  0














                                  Yes, sometimes it happened when we installed Magento 2 and 404 error occured. This error may be one of these:



                                  Error after installing/upgrading
                                  Fresh install on Ubuntu
                                  Page 403 Forbidden errors
                                  Due to Messy page



                                  I think you should modify from:



                                  <Directory /var/www/>
                                  Options Indexes FollowSymLinks
                                  AllowOverride None
                                  Require all granted
                                  </Directory>


                                  to:



                                  <Directory /var/www/>
                                  Options Indexes FollowSymLinks
                                  AllowOverride All
                                  Require all granted
                                  </Directory>


                                  Then restart apache. It should work.





                                  share








                                  New contributor




                                  Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                  Check out our Code of Conduct.























                                    0












                                    0








                                    0







                                    Yes, sometimes it happened when we installed Magento 2 and 404 error occured. This error may be one of these:



                                    Error after installing/upgrading
                                    Fresh install on Ubuntu
                                    Page 403 Forbidden errors
                                    Due to Messy page



                                    I think you should modify from:



                                    <Directory /var/www/>
                                    Options Indexes FollowSymLinks
                                    AllowOverride None
                                    Require all granted
                                    </Directory>


                                    to:



                                    <Directory /var/www/>
                                    Options Indexes FollowSymLinks
                                    AllowOverride All
                                    Require all granted
                                    </Directory>


                                    Then restart apache. It should work.





                                    share








                                    New contributor




                                    Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.










                                    Yes, sometimes it happened when we installed Magento 2 and 404 error occured. This error may be one of these:



                                    Error after installing/upgrading
                                    Fresh install on Ubuntu
                                    Page 403 Forbidden errors
                                    Due to Messy page



                                    I think you should modify from:



                                    <Directory /var/www/>
                                    Options Indexes FollowSymLinks
                                    AllowOverride None
                                    Require all granted
                                    </Directory>


                                    to:



                                    <Directory /var/www/>
                                    Options Indexes FollowSymLinks
                                    AllowOverride All
                                    Require all granted
                                    </Directory>


                                    Then restart apache. It should work.






                                    share








                                    New contributor




                                    Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.








                                    share


                                    share






                                    New contributor




                                    Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.









                                    answered 3 mins ago









                                    Aanchal KauraAanchal Kaura

                                    1




                                    1




                                    New contributor




                                    Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.





                                    New contributor





                                    Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






                                    Aanchal Kaura is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                    Check out our Code of Conduct.






























                                        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%2f1049582%2fmagento-2-admin-404-error%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

                                        GameSpot

                                        connect to host localhost port 22: Connection refused

                                        Getting a Wifi WPA2 wifi connection