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;
}