You have to configure the rewrite rule in the Nginx configuration file for OpenCart because Nginx does not use the access file.
Login to Virtualmin >> Webmin >> servers >> Nginx >> edit config file
Add the following code to the Nginx configuration file and you're done. Your site should work properly.
# START Rewrite rules
rewrite ^/sitemap.xml$ /index.php?route=feed/google_sitemap last;
rewrite ^/googlebase.xml$ /index.php?route=feed/google_base last;
rewrite ^/download/(.*) /index.php?route=error/not_found last;
if (!-f $request_filename) {
set $rule_3 1$rule_3;
}
if (!-d $request_filename) {
set $rule_3 2$rule_3;
}
if ($uri !~ ".*.(ico|gif|jpg|jpeg|png|js|css)") {
set $rule_3 3$rule_3;
}
if ($rule_3 = "321") {
rewrite ^/([^?]*) /index.php?_route_=$1 last;
}
# END Rewrite rules
Note: Download the backup of your Nginx config file before making changes and restart the Nginx service after the changes.