Jump to content

Prestashop 1.7 Backoffice 404 Error


Recommended Posts

Hello,

 

I have installed the latest version of prestashop (1.7) but the backoffice page does not open after login.

 

I get 404 Error page : 

The page you are looking for was not found.

 

I have tried to reinstalling it but i still get the same error.

 

I've made an installation on my localhost pc with xampp installed on it and it works but on the server where is hosted my domain doesn't work. How can i enable the debug mode in prestashop 1.7 ?

 

 

What can be done to solve this issue? 

 

Kind regards,

 

Petru

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

We had the same problem on our hosting, which seemed to arise because of a misconfiguration of Apache when using php-fpm.
Implementing the proposed fix in: https://www.prestashop.com/forums/topic/519123-config-prestashop-17-and-nginx/ in our Apache config, seems to have fixed the 404 error.

Because we use PHP-fpm som ajustment had to be made to our Apache config.
 
We had the following LocationMatch in our config:
 
<LocationMatch ^(.*\.php)$>
   ProxyPass fcgi{colon}{slash}{slash}127.0.0.1:9000/data/prestashop$1 enablereuse=on
</LocationMatch>
 
This breaks symfony urls, but was simply fixed by inserting the following instead:
 

<LocationMatch ^(.*\.php)>
   ProxyPass fcgi{colon}{slash}{slash}127.0.0.1:9000/data/prestashop$1 enablereuse=on
</LocationMatch>
 
Note that the forum spamfilter removes parts of the config when posted in its entirety.
Please replace ' {colon} ' with ' : ' and ' {slash} ' with ' / '.

 
 
Then apache will proxy the Symfony requests, with characters after .php, on to php-fpm.

Edited by esmDanhost (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hello Prestashop. I have the same issue - whenever i try to access backoffice i get 404 error. This happening right after installing.

 

Presta 1.7

tried PHP 5.6, 7.0, 7.1,

tried .htaccess magic,

contacted my provider but all of it with no solution

reinstall 3 times

 

Is there someone who can help? My fotder is named admin, i tried to rename it - whatever i do, i have 404. I cant access my shop. Can someone point me right direction? :) Thanks

Link to comment
Share on other sites

Ok i find a way. After whole day of testing.

 

There is problem with .htaccess inside the admin folder. If you delete it generate your admin URL, rename the folder and everything looks fine. .htaccess from admin folder cant be returned, because it cause the 404 again. I dont know anything about functionality from this point and i dont know if shop is affected by deleting this file.

 

:)

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hello,

 

I have quite a similar problem. I can't access the products and the modules page in Backoffice.

 

I tried to delete .htaccess

I tried to delete .htaccess, rename admin folder

I reinstalled the whole system

 

Nothing worked so far.

 

Any more ideas what I could do?

 

Cheers!

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

We had the same problem on our hosting, which seemed to arise because of a misconfiguration of Apache when using php-fpm.

Implementing the proposed fix in: https://www.prestashop.com/forums/topic/519123-config-prestashop-17-and-nginx/ in our Apache config, seems to have fixed the 404 error.

 

Because we use PHP-fpm som ajustment had to be made to our Apache config.

 

We had the following LocationMatch in our config:

 

<LocationMatch ^(.*\.php)$>

   ProxyPass fcgi{colon}{slash}{slash}127.0.0.1:9000/data/prestashop$1 enablereuse=on

</LocationMatch>

 

This breaks symfony urls, but was simply fixed by inserting the following instead:

 

 

<LocationMatch ^(.*\.php)>

   ProxyPass fcgi{colon}{slash}{slash}127.0.0.1:9000/data/prestashop$1 enablereuse=on

</LocationMatch>

 

Note that the forum spamfilter removes parts of the config when posted in its entirety.

Please replace ' {colon} ' with ' : ' and ' {slash} ' with ' / '.

 

 

Then apache will proxy the Symfony requests, with characters after .php, on to php-fpm.

 

Thanks for this, you solved my problem.

 

I had the following directive, which broke some of the URLs  (pasting here, in case someone else has a similar problem).

 

ProxyPassMatch ^.*[.]php$ fcgi{colon}{slash}{slash}127.0.0.1:9000/data/prestashop  # does NOT work

 

This was causing me a "Service unavailable" error (503) on Apache, that was unable to reach any URL of the following form:

 

http://mystore/adminXXXXX/index.php/module/catalog?_token=...

Link to comment
Share on other sites

  • 2 weeks later...

Hello, i had this problem too.

 

I fixed the problem by doing the following steps:

 

1) Go to the "admin" folder

2) Find the file .htaccess, (backup in another location) and delete it

3) For security, rename the "admin" folder example: "consola"

4) Try enter again with the direction: "yourdomain.com/consola"

 

View tutorial here: https://youtu.be/nHyHBJBf57o

Link to comment
Share on other sites

  • 4 months later...

I had the same error, just realised than once you log in the first time, system changes your admin folder name for something like "admin2446dfee8z", so next time, whe you try to log in to your url/admin the page is not found. So you have two solutions, rename admin folder or access using the new URL. Don't know why is that happening, maybe security reasons?? 

Try this and let us know if this works.

Link to comment
Share on other sites

  • 9 months later...
  • 1 month later...
On 12/11/2018 at 2:10 AM, info.artematelier@gm said:

SAME HERE.

 

PRESTASHOP SI THE WORST PLATFORM

You are using a open source platform FOR FREE, and you happend to have a issue that you cant resolve...

I don't think complaining about it is gonna help anyone.

Link to comment
Share on other sites

8 hours ago, Inform-All said:

You are using a open source platform FOR FREE, and you happend to have a issue that you cant resolve...

I don't think complaining about it is gonna help anyone.

KInd of for free. After all the continue errors that you have all the time and the slow updates- paying the developers to fix is not quite for free! But anyway! At one point you are right-complaining does not help anyone.

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...
location /admin/ { # [REQUIRED EDIT] the name of your admin directory
    if (!-e $request_filename) {
        rewrite ^/.*$ /admin/index.php last;   # [REQUIRED EDIT] the name of your admin directory
    }
}

In the provided nginx config (I guess same goes for apache) you have to change `location` /admin/ directory to the one generated during your install. The correct directory should be right in top of your root directory listing in the explorer. In my case I had to change it to:

location /admin220eezytb/ {
    if (!-e $request_filename) {
        rewrite ^/.*$ /admin220eezytb/index.php last;
    }
}

 

  • Like 1
Link to comment
Share on other sites

  • 9 months later...

Hi guys,

I got the same issue before.

The issue is the admin path is dynamic, then you have to update the default nginx snippet

Just change 

# [REQUIRED EDIT] Change this block to your admin folder
    location /admin-dev/ {
        if (!-e $request_filename) {
            rewrite ^/.*$ /admin-dev/index.php last;
        }
    }

to 

# [REQUIRED EDIT] Change this block to your admin folder
    location /admin379trpn8t/ {
        if (!-e $request_filename) {
            rewrite ^/.*$ /admin379trpn8t/index.php last;
        }
    }


 

admin379trpn8t is the generated admin path after you just installed the platform

 

ps1770.local.conf

Link to comment
Share on other sites

  • 5 weeks later...
On 12/21/2020 at 6:19 AM, Tyler Nguyen said:

Hi guys,

I got the same issue before.

The issue is the admin path is dynamic, then you have to update the default nginx snippet

Just change 


# [REQUIRED EDIT] Change this block to your admin folder
    location /admin-dev/ {
        if (!-e $request_filename) {
            rewrite ^/.*$ /admin-dev/index.php last;
        }
    }

to 


# [REQUIRED EDIT] Change this block to your admin folder
    location /admin379trpn8t/ {
        if (!-e $request_filename) {
            rewrite ^/.*$ /admin379trpn8t/index.php last;
        }
    }


 

admin379trpn8t is the generated admin path after you just installed the platform

 

ps1770.local.conf 5.45 kB · 1 download

can you please explain a bit more, I didn't understand.  Witch file we need to edit?

Where is supposed to be located the ps1770.local.conf ?

Link to comment
Share on other sites

6 hours ago, lordshop said:

can you please explain a bit more, I didn't understand.  Witch file we need to edit?

Where is supposed to be located the ps1770.local.conf ?

Hi there,

 

You have to determine what is your nginx virtualhost configuration file first (it's usually in /etc/nginx/sites-available/)

Then just modify it, look for the patterns that I mentioned and replace by the correct one.

Don't forget to restart your nginx service

 

Cheers,

Tyler

 

Link to comment
Share on other sites

  • 7 months later...

I had same problem, on local server was all fine, but on public hosting not. Problem was in only one single line.

 

In .htaccess in admin folder only comment this line (MULTIVIEWS

<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

to

<IfModule mod_negotiation.c>
    #Options -MultiViews
</IfModule>

After all request are with code 200 OK. Many public providers has this entity switch off, i don't know why, but it is. And second thing, version of PHP on PS 1.7.7.5 is ideal PHP 7.4.

 

So glad to help i hope.

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...