Welcome to Centmin Mod Community
Become a Member

Prestashop Nginx template Prestashop

Discussion in 'Ecommerce / Shopping cart usage' started by adamus007p, Mar 21, 2020.

  1. adamus007p

    adamus007p Member

    357
    18
    18
    Feb 8, 2019
    Ratings:
    +35
    Local Time:
    4:00 AM
    Hello may you share with your Prestashop 1.6 nginx templates?



    Lathanao/nginx



    can anyone help how to use it with centminmod?
    what to change to get working config....
     
    Last edited: Mar 21, 2020
  2. Lathanao

    Lathanao New Member

    4
    3
    3
    Jun 24, 2020
    Ratings:
    +6
    Local Time:
    10:00 AM
    Hello,

    Glad to see some of my conf files might be useful for some people!
    I precise I found your post totally by chance!

    So, I think it could work perfectly for your case.
    Except if you work on a very specific case where you absolutely need to use PS1.6, seriously, think to switch to PS1.7.7.
    There is a lot of more good features, like Fuzzy search, etc... and it's far more faster.

    Just for info, in the PrestaShop doc, there are some conf files in example for PS1.7.7:
    https://github.com/PrestaShop/PrestaShop/tree/develop/docs/server_config

    L+
     
  3. dandumit

    dandumit New Member

    19
    1
    3
    Jan 9, 2021
    Ratings:
    +1
    Local Time:
    5:00 AM
    HEllo Both,
    I am interested as well on this subject.
    Could you post some more details ? IT seems that both links are not working.
    Also some guidance how to configure cache in PRestashop would be very good.
    Thank you,
    Daniel
     
  4. Lathanao

    Lathanao New Member

    4
    3
    3
    Jun 24, 2020
    Ratings:
    +6
    Local Time:
    10:00 AM
    Hello,

    You're right, nginx file has been removed by this PR:
    https://github.com/PrestaShop/PrestaShop/pull/20581/files

    I moved the file of the link in the first comment, here it is now:
    https://github.com/Lathanao/PHP-Ngi...x/sites-available/nginx_example_for_PS16.conf

    The doc has been updated and you can find a nginx conf sample here:
    https://devdocs.prestashop.com/1.7/basics/installation/nginx/

    Here a link about the cache:
    https://devdocs.prestashop.com/1.7/modules/introduction/#about-the-cache

    Probably that the documentation is not fully explicite, but cache in Prestashop are really easy to understand.

    Regards.
     
    Last edited: Jan 10, 2021
  5. dandumit

    dandumit New Member

    19
    1
    3
    Jan 9, 2021
    Ratings:
    +1
    Local Time:
    5:00 AM
    thank you @Lathanao for support. I am getting closer to install presta 1.7.7.1 (after several days of struggle)
    however I do still have some issues :
    - in php I need to activate Fileinfo extension and intl
    - looks extremely complicated to create some fake subdomains like cdn1.domanin.com to point to /img/ folder

    Could you please share how did you fixed those ? have you documented the install ?

    and a huge stupid question : from ngix config file I saw there some equivalents of apache rewrite commands. those are not working on ngix ? I prestashop there are some automatic completion of .htaccess file... will those still work ?

    Thank you,
    Daniel
     
  6. Lathanao

    Lathanao New Member

    4
    3
    3
    Jun 24, 2020
    Ratings:
    +6
    Local Time:
    10:00 AM
    1. I don't know fileinfo extension. But for intl, you just have to install it with e.g.
    Code (Text):
    apt install php7.4-intl
    

    Then check in your php.ini if it well installed
    Code (Text):
    extension=intl
    

    Then you can check if the extension is well working on your php. One way to check could be:
    Code (Text):
    <?php
    print_r(get_loaded_extensions());
    

    2. For CDN domain, it's not complicated. It's mostly to set some 'real' CDN. E.g. Maxcdn (now stackpath) can be set in only 5 min.

    Do you want to set some 'fake URL' to set your images with a cookie free url? It's mostly some Nginx setup. I don't remember clearly what are Nginx option to achieve that, but it's not really hard.

    3. It's not a stupid question, because it could be a real problem. Yes you're right, the .htaccess management made by Prestashop could not be done with Nginx.

    You have to decide if it's a problem or not for you.
     
  7. tininho

    tininho Active Member

    182
    44
    28
    May 22, 2019
    Ratings:
    +135
    Local Time:
    5:00 AM
  8. eva2000

    eva2000 Administrator Staff Member

    49,764
    11,447
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,789
    Local Time:
    1:00 PM
    Nginx 1.21.x
    MariaDB 10.x
    intl should be installed by default already you can check via
    Code (Text):
    php --ri intl

    example
    Code (Text):
    php --ri intl
    
    intl
    Internationalization support => enabled
    ICU version => 62.2
    ICU Data version => 62.2
    ICU TZData version => 2019a
    ICU Unicode version => 11.0
    
    Directive => Local Value => Master Value
    intl.default_locale => no value => no value
    intl.error_level => 0 => 0
    intl.use_exceptions => 0 => 0
    

    for fileinfo, how much memory on your server ?
    output for command
    Code (Text):
    free -m
    

    For 123.09beta01 and higher, you need at least 1023000 kilobytes of total swap space and 780000 kilobytes of memory to enable fileinfo php extension due to fileinfo's native high memory compilation requirements.

    Basically fileinfo php compile via source is memory intensive. Same problem whenever you source compile PHP on any system

    i.e.
    If you meet the swap disk and minimum memory requirements, set in persistent config file /etc/centminmod/custom_config.inc
    Code (Text):
    PHPFINFO=y
    

    then run centmin.sh menu option 5 to recompile your php version
     
  9. dandumit

    dandumit New Member

    19
    1
    3
    Jan 9, 2021
    Ratings:
    +1
    Local Time:
    5:00 AM
    Thank you @Lathanao - when I said CDN I missleaded you . PRestashop allows a configuration of 3 media servers , usually those are subdomains of same domain pointing to root folder to deliver static content - and Nginx shines here. This allows between browser and server parallel loading of resources.

    But it seems that in Centmin Mod it's not so easy to setup some kind of "fake" subdomains. however this would be very usefull for Presta installs.
    Thank you
    Daniel