Hello. Does anyone have working nginx settings for Presta 1.7? I got Presta in multistore/multidomain and it is not working correctly. Now it is offline... with errors: 2019/02/22 17:51:45 [error] 9950#9950: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught --> Smarty: Unable to load template 'modules_languageselector/ps_languageselector-hreflang.tpl' in 'file:_partials/head.tpl' <-- thrown in /var/www/clients/XXX/YYY/web/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195" while reading response header from upstream, client: 94.254.184.226, server: some-domain.com, request: "GET /index.php HTTP/2.0", upstream: "fastcgi://unix:/var/lib/php7.0-fpm/web204.sock:", host: "some-domain.com" 2019/02/22 17:52:09 [error] 9950#9950: *8 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught --> Smarty: Unable to load template 'modules_languageselector/ps_languageselector-hreflang.tpl' in 'file:_partials/head.tpl' <-- thrown in /var/www/clients/XXX/YYY/web/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 195" while reading response header from upstream, client: 66.249.66.56, server: some-domain.com, request: "GET /index.php?id_product=5019&id_product_attribute=41826&rewrite=something&controller=product HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php7.0-fpm/web204.sock:", host: "some-domain.com" MY NGINX SETTINGS - while server was unavailable for world it was working smoothly. No matter PHP7.0/7.1/7.2... location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ (.+\.php)$ { try_files $uri =404; root /usr/share/; {FASTCGIPASS} #fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; include /etc/nginx/fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_buffer_size 128k; fastcgi_buffers 256 4k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; fastcgi_intercept_errors on; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; } location /roundcube { root /var/lib/; index index.php index.html index.htm; location ~ (.+\.php)$ { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; fastcgi_index index.php; #fastcgi_intercept_errors on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_buffer_size 128k; fastcgi_buffers 256 4k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } location ~* /.svn/ { deny all; } location ~* /README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ { deny all; } location ~* ^/roundcube/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /webmail { rewrite ^ /roundcube last; } location ~* \.(jpg|jpeg|png|gif|ico)$ { expires 365d; } location ~* \.(jpg|jpeg|png|gif|ico)$ { log_not_found off; access_log off; } ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # Do people still use Internet Explorer 6? In that case, disable gzip and hope for the best! gzip_vary on; # Also compress content with other MIME types than "text/html" gzip_types application/json text/css application/javascript; # We only want to compress json, css and js. Compressing images and such isn't worth it gzip_proxied any; gzip_comp_level 6; # Set desired compression ratio, higher is better compression, but slower gzip_buffers 16 8k; # Gzip buffer size gzip_http_version 1.0; # Compress every type of HTTP request location ~ "^/admin(.*?)/" { client_max_body_size 100M; if (!-e $request_filename) { rewrite ^/admin(.*?)/.*$ /admin$1/index.php last; } } location ~ "^/backoffice(.*?)/" { client_max_body_size 100M; if (!-e $request_filename) { rewrite ^/backoffice(.*?)/.*$ /backoffice$1/index.php last; } } location / { client_max_body_size 100M; rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; try_files $uri $uri/ /index.php$is_args$args; error_page 404 /index.php?controller=404; #location ~ "^/admin(.*?)/" { # if (!-e $request_filename) { # rewrite ^/admin(.*?)/.*$ /admin$1/index.php last; # } #} location ~* \.(gif)$ { rewrite ^/images_ie/?([^/]+)\.(gif)$ /js/jquery/plugins/fancybox/images/$1.$2 last; expires 2592000s; } location ~* \.(jpeg|jpg)$ { rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last; rewrite ^/c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2$3.jpg last; rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg last; rewrite ^/images_ie/?([^/]+)\.(jpe?g)$ /js/jquery/plugins/fancybox/images/$1.$2 last; expires 2592000s; } location ~* \.(png)$ { rewrite ^/images_ie/?([^/]+)\.(png)$ /js/jquery/plugins/fancybox/images/$1.$2 last; expires 2592000s; } location ~* \.(css)$ { expires 604800s; } location ~* \.(js|jsonp)$ { expires 604800s; } location ~* \.(js)$ { expires 604800s; } location ~* \.(ico)$ { expires 31536000s; } location ~* \.(ttf|ttc|otf|eot|woff|svg)$ { add_header Access-Control-Allow-Origin *; } location ~ \.php$ { try_files $uri =404; include /etc/nginx/fastcgi_params; {FASTCGIPASS} fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #fastcgi_param PATH_INFO $fastcgi_script_name; #fastcgi_intercept_errors on; fastcgi_temp_file_write_size 10m; fastcgi_busy_buffers_size 512k; fastcgi_buffer_size 512k; fastcgi_buffers 16 512k; fastcgi_read_timeout 1200; } }
i also tried different github presta 1.7 / nginx solutions without success. I got 2 days and switching to apache2.
ok, so problably those settings are partialy fine and error is a result of some changes made by web developer... but still I see that SEF URL rewriting is not working as expected... so If anyone got proper Presta 1.7 NGINX settings for ispconfig please save my time
after few days of testing multistore / multidomain Presta 1.7 on NGINX PHP 7.0/7.1/7.2, 10 000 products, 5 domains --> I can say it is not ready for NGINX despite what Presta mighty developers are saying. They are trying to fix it on github but those simple NGINX declarations are not working. Shop is 85% functional and there might be other issues with other modules... so "abandon the ship or abandon the hope!"