Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All pages 404 on clean install #20999

Closed
LocalHeroPro opened this issue Sep 15, 2020 · 12 comments
Closed

All pages 404 on clean install #20999

LocalHeroPro opened this issue Sep 15, 2020 · 12 comments
Labels
No change required Resolution: issue closed because expected as is

Comments

@LocalHeroPro
Copy link

Describe the bug

All pages are with 404 error.

2020/09/15 19:35:30 [error] 1488572#1488572: *1017 open() "/data/www/example.com/html/contact" failed (2: No such file or directory), client: xx.xx.xx.xxx, server: example.com, request: "GET /contact HTTP/1.1", host: "example.com", referrer: "http://example.com/"

Expected behavior

Provide working config, not part or scratch.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Make fresh install 1.7.6.x
    from zip file (https://download.prestashop.com/download/releases/prestashop_1.7.6.7.zip) or
    from github repository (https://github.com/PrestaShop/PrestaShop/tree/1.7.6.x)
  2. Use provided config file for nginx
    https://devdocs.prestashop.com/1.7/basics/installation/nginx/
  3. Get on all sub pages 404 error.

Additional information

  • PrestaShop version: 1.7.6.x
  • PHP version: PHP7.3.22-FPM
@prestashop-issue-bot
Copy link

Thanks for opening this issue! We will help you to keep its state consistent

@sarahdib
Copy link
Contributor

Hello @LocalHeroPro

As indicated in devdocs PrestaShop 1.7.6. is not compatible with PHP 7.3

Please downgrade your php version.

It seems that your issue is not a PrestaShop core bug but most likely a server configuration.

Thank you!

@sarahdib sarahdib added the No change required Resolution: issue closed because expected as is label Sep 16, 2020
@LocalHeroPro
Copy link
Author

I downgraded to PHP7.2 and I have the same issue.
Please provide proper config file for setup Prestashop.
And also sarahdib 4u.

@kpodemski
Copy link
Contributor

It has to be related to your nginx configuration as I ran without any issues PrestaShop 1.7.6 on nginx

@LocalHeroPro
Copy link
Author

Could you provide config file? After that we can update outdated Prestashop docs.

@LocalHeroPro
Copy link
Author

sarahdib, also you write (and in hurry close topic with bug)

As indicated in devdocs PrestaShop 1.7.6. is not compatible with PHP 7.3

and official package saying something different
image
So where we have the truth?

@LocalHeroPro
Copy link
Author

Hmmm it's interesting, because admin-dev working as expected, but on frontend only homepage working as expected.
Solution for that is to add in nginx config file

    location / {
        root   /var/www/presta.local/html;
        index  index.php;
        try_files $uri $uri/ /index.php$is_args$args;
    }

Please, reopen and add to example nginx config file to fix misleading Prestashop dosc.

@LocalHeroPro
Copy link
Author

And also, it's look like your team double server_name twice.

# [REQUIRED EDIT] Your domain name goes here
server_name server_name example.com www.example.com;

I think it's unnecessary.

@matks
Copy link
Contributor

matks commented Sep 21, 2020

sarahdib, also you write (and in hurry close topic with bug)

As indicated in devdocs PrestaShop 1.7.6. is not compatible with PHP 7.3

and official package saying something different
image
So where we have the truth?

Here is the truth 😄 : we have done an extensive work of deep testing of PrestaShop 1.7.7 to find and fix all compatibility issues that come with php7.3 . Consequently we can officially say "PrestaShop 1.7.7 is compatible with php7.3 because we have thoroughly checked everything works with php7.3".

However this extensive work was not done for PS 1.7.6 . So a big part of PrestaShop 1.7.6 is probably compliant with php7.3 and even php7.4 but not all of it.

The same work will happen for PS 1.7.8 and php7.4 : a very large testing campaign will be run to find and fix all issues that come with php7.4 and ensure they are fixed. This does not mean PS 1.7.7 is completely broken with php7.3 . However we cannot guarantee PS 1.7.7 works fine with php7.4 . There is probably a large number of features working fine with php7.4 and a few ones which are broken.

@LocalHeroPro
Copy link
Author

That clarifications don't mention about wrong docs and wrong compatibility and extensions checker.

@kalise0
Copy link

kalise0 commented Feb 5, 2021

Hmmm it's interesting, because admin-dev working as expected, but on frontend only homepage working as expected.
Solution for that is to add in nginx config file

    location / {
        root   /var/www/presta.local/html;
        index  index.php;
        try_files $uri $uri/ /index.php$is_args$args;
    }

Please, reopen and add to example nginx config file to fix misleading Prestashop dosc.

This solved the problem by my side !

The documentation of prestashop seems ton contain errors / missing parts here : https://devdocs.prestashop.com/1.7/basics/installation/nginx/

double server_name instruction and missing part for rewrite.

@sveneusewig
Copy link

prestashop_1.7.8.3.zip

404 Not Found
nginx/1.20.1

That's all there is to it with your Prestashop. Any php script and vhost can be run with my nginx, just not your Prestashop with your configuration https://devdocs.prestashop.com/1.7/basics/installation/nginx/.

XXX [notice] 15812#0: *3 "^/(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/(\d)(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/c/([\w.-]+)/.+\.jpg$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^images_ie/?([^/]+)\.(gif|jpe?g|png)$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^/api/?(.*)$" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"
XXX [notice] 15812#0: *3 "^(/install(?:-dev)?/sandbox)/.*" does not match "/index.php", client: ::1, server: XXX, request: "GET / HTTP/1.1", host: "XXX"

I don't feel like checking your rewriting rules. Until recently it was still working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No change required Resolution: issue closed because expected as is
Projects
None yet
Development

No branches or pull requests

6 participants