cancel
Showing results for 
Search instead for 
Did you mean: 

no access to frontend never backend after a succesful installation...

Re: no access to frontend never backend after a succesful installation...

@cedriclere7b59 ,

As per your last comment. you are adding secure and unsecure URL, also you're passing use-secure=1 then it's definitely picking https.

Pass http:// URL in secure URL as well along.

try below :

--base-url=http://www.ortie-bio.fr/  --use-secure=1 --base-url-secure=http://www.ortie-bio.fr/ --use-secure-admin=1
php bin/magento cache:flush

New Magento reinstall will have same thing, this configuration.

try this again

 

Problem Solved ? Click on 'Kudos' & Accept as Solution to encourage to write more answers !

Re: no access to frontend never backend after a succesful installation...

No, the command "--base-url-secure" requires necessarly https... 

 

Re: no access to frontend never backend after a succesful installation...

Hello,
I did do a lots of things by myself so I don't know what was the issue...
It was not the installation of the ssl certificate, the checker was ok:
https://decoder.link/sslchecker/ortie-bio.fr/443
I Reviewed my config files ssl.conf, vhost.conf, *.conf in the sites-availables directory,...
an *AllowEncodedSlashes NoDecode* problem?
a redirection problem?... :
https://www.namecheap.com/support/knowledgebase/article.aspx/9821/38/apache-redirect-to-https/
Must we install with http and go in the configuration of magento to configure the https? ...
https://www.linode.com/docs/guides/install-magento-2-4-on-centos-8/
I don't know what I did but now it works, sorry that nobody could help me and sorry I can't help anybody more precisely...

Re: no access to frontend never backend after a succesful installation...

hello, as I did have some other issues I was forced to reinstall all my machine with an ubuntu 20.04. OS

I was confronted to the same issue again but now I have the solution : 

In your virtual host config file in "/etc/apache2/sites-available/domain1.com.conf" you must add the code for your ssl, but most of the tutorials  don't say you must copy too : 
<Directory {path_to_public_html}>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
</Directory>
in the <VirtualHost {my_ip}:443> section...
But if you had installed magento before configuring your ssl connection it will not work ! it 's a sort of bug in magento but I think they will not admit it... no solutions on the forums... you must uninstall magento, remove all the files in your web root directory and create a new composer project and reinstall magento with the https options in the command. 
Then it will works but be carefull, there is a lot's of bugs they don't have resolved... if you go in "stores" , "configuration", "web", "base URLs (secure)" , don't change anything to "Secure Base URL for Static View Files" or "Secure Base URL for User Media Files" or "Enable HTTP Strict Transport Security (HSTS)" because I don't know which of the three but all will break down with no jss and css in frontend and backend ... a one more bug I think...
I hope my experience will help.

 

Re: no access to frontend never backend after a succesful installation...

Hello @cedriclere7b59 

Follow the following steps to solve this problem 

First of all, apply proper permissions, enable apache "rewrite_module" and refresh apache server.

chmod -R 777 /var/www/html/MAGENTO_2_ROOT_DIRECTORY/

sudo a2enmod rewrite

sudo service apache2 restart


For messy frontend, run following command from Magento root:

php bin/magento setup:static-content:deploy


Now clear "var" directory except ".htaccess" file and check admin. If you get 404 page, there may be an issue of "Symlink". Fot this, Edit "apache config" file

sudo gedit /etc/apache2/apache2.conf


and replace this code :

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

with

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

Note: changed "AllowOverride none" to "AllowOverride All" 

Now restart apache "sudo service apache2 restart" and check admin. This should fix admin 404 issue.

Also make sure, you don't leave "/app/etc/" directory writeable

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

 

Re: no access to frontend never backend after a succesful installation...

Hello @cedriclere7b59 

Make sure you enabled server rewrites please refer to the following link for details :
 
http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache.html#apache-help-rewrite

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

 

Re: no access to frontend never backend after a succesful installation...

Hello @cedriclere7b59 ,

If nothing helped you then please try the following solutions one by one to solve the issue 

 

 1. Flush and Clear Magento Cache by Command line or removing folders manually.

 
php
bin/magento cache:clean
 rm -rf var/cache/*
 rm -rf var/generation/*
 

Or you can manually delete the cache and generate a folder inside a var folder from Cpanel.

 

2. Enable Rewrite mode,

     - sudo a2enmod rewrite

 

 

Configure apache.

 For Ubuntu / Debian edit the file /etc/apache2/apache2.conf. To edit this file run command

 sudo vi /etc/apache2/apache2.conf

 

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

sudo service apache2 restart
or
sudo /etc/init.d/apache2 restart
or
sudo systemctl restart apache2
 

 

4. Check the admin URL from the env.php file.

 Go to app/etc/env.php open that file

 And look for the admin URL, code must be like below

 You can see/change admin URL from @app/etc/env.php


  return
array (
  'backend' =>
  array (
  'frontName' => 'admin_q76xvk',   
  ),
 

"admin_q76xvk" this is the admin url in this case Make sure you are typing the correct admin   URL.

     
5. For local environment sometimes URL issue like

During Setup you can replace the URL i.e., http://localhost/ with http://127.0.0.1/


6. Try these steps

 

Delete var/cache folder
Go to database SELECT * FROM core_config_data WHERE path = 'web/seo/use_rewrites' and make it 0

Then enter URL in your browser domain.com/index.php/adminurl

 

You don’t have to perform all of the solutions described in this list, but instead, try one by one and see what works for your store. And when you find the right solution for your store