SEO URLs in OpenCart v3

To change the cryptic computer generated URLs to something more meaningful in OpenCart version 3 running on Nginx.

1) In the back office go and toggle:

  • System -> Settings -> Your Store -> [edit] -> Server -> Use SEO URLs -> Yes

2) Edit the relevant configuration file in the directory /etc/nginx/sites-enabled and add:

location / {
try_files $uri @opencart;

location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;

location ~* (\.(tpl|ini))$ {
deny all;


PrestaShop: The geolocation database is unavailable.

If you seemingly follow the PrestaShop instructions “In order to use Geolocation, please download this file and extract it (using Winrar or Gzip) into the /app/Resources/geoip/ directory.” and still you get an error message saying “The geolocation database is unavailable.”, you probably misread the instructions.

You are supposed to extract the compressed file under its own name into a directory called “/app/Resources/geoip/” and not “/app/Resources/geoip/directory“.

PrestaShop 404 Not Found

Running PrestaShop you may experience error “404 Not Found” when attempting to connect to the back office.

If running nginx, add the following to your site’s configuration file in sites_enabled:

location /<YOUR_ADMIN_FOLDER>/ {
   if (!-e $request_filename) {
      rewrite ^/.*$ /<YOUR_ADMIN_FOLDER>/index.php last;

Where <YOUR_ADMIN_FOLDER> is your admin directory in Prestashop’s installation path, looking something like “admin563hdsk25”.

If you already see in the configuration file something like this, check if the <YOUR_ADMIN_FOLDER> parameter matches the actual path, as it may be simple leftover from another case.

Apache ignores .htaccess file

If your Apache2 server straight ignores .htaccess files as if they would not be there at all, see if the particular site configuration file has the “AllowOverride All” statement within it’s “Directory” section.

Add the statement and restart/reload the Apache2 server.

Enable SSL for Apache

If you are configuring SSL site with your Apache2 server and everything seems fine, but the server is  stubbornly refusing HTTPS connections, you may have overlooked enabling the SSL module.

Enable SSL with Apache2:

  • sudo a2enmod ssl

Convert PDF to EPS

You may want to convert a PDF file to EPS format, for example to insert it in a Microsoft Word of LibreOffice Writer document.

One way to do is like this. This workflow creates an intermediary Postscript file during the conversion. Note: no need to provide name of the output EPS file, it will be created automatically.


  • pdf2ps myfile.pdf; ps2eps

Find disk usage at command line

To find out disk usage by directories, use:

  • ncdu