Post by omx89 » Mon Jun 08, 2020 2:19 pm

Hello,

I have installed OpenCart on Nginx using Bitnami and my opencart files are located in this path /opt/bitnami/apps/opencart/htdocs and my Nginx path is /opt/bitnami/nginx

This is my nginx-prefix.conf file below and I have tried every solution online I can find but I cannot make the SEO URL work the links work fine if I turn off the SEO URL from the admin panel.

Filename: nginx-prefix.conf

Code: Select all

location /opencart {
    index  index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
    alias "/opt/bitnami/apps/opencart/htdocs";
    include "/opt/bitnami/apps/opencart/conf/nginx-app.conf";
}
location / {
  index  index.php index.html index.htm;
  if (!-e $request_filename){
    rewrite ^/([^?]*) /index.php?_route_=$1 break;
  }
  if ($request_filename ~* ^.*?/([^/]*?)$)
        {
          set $filename $1; 
        }

  if ($filename ~* ^.*?\.(eot)|(ttf)|(woff)$){
    add_header Access-Control-Allow-Origin *;
  }
  alias "/opt/bitnami/apps/opencart/htdocs/";
  include "/opt/bitnami/apps/opencart/conf/nginx-app.conf";
}

autoindex off;

location ~ .*\.(ico|gif|jpg|jpeg|png|js|css) {
}

location /system {
  rewrite ^/system/storage/(.*) /index.php?route=error/not_found break;
}

location = /sitemap.xml {
  rewrite ^(.*)$ /index.php?route=extension/feed/google_sitemap break;
}

location = /googlebase.xml {
  rewrite ^(.*)$ /index.php?route=extension/feed/google_base break;
}

Newbie

Posts

Joined
Mon Jun 08, 2020 2:13 pm

Post by letxobnav » Mon Jun 08, 2020 4:48 pm

I am not knowledgable on nginx but maybe this has some clues:
https://serverfault.com/questions/85099 ... with-nginx

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 10 guests