Claro que serve

, já tinha dado uma olhada nele e estava aqui guardado para testes e finalmente consegui
Para quem precisar, segue o código completo que estou usando:
Obs: Apague os comentários ->
Código: Selecionar todosserver {
listen 80;
server_name open.fgame.com.br ip-do-servidor(não sei se é obrigatório, mas sempre coloco);
root /var/www/open2; -> pasta onde vai ficar o Opencart
index index.php index.html;
location /image/data {
autoindex on;
}
location /admin {
index index.php;
}
location / {
try_files $uri @opencart; -> A mágica acontece aqui
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last; -> Continuação da mágica
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
}
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# output compression saves bandwidth
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/php text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# make sure gzip does not lose large gzipped js or css files
# see http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl
gzip_buffers 16 8k;
# Disable gzip for certain browsers.
gzip_disable “MSIE [1-6].(?!.*SV1)”;
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ {
expires 30d;
access_log off;
}
# removes trailing slashes (prevents SEO duplicate content issues)
if (!-d $request_filename)
{
rewrite ^/(.+)/$ /$1 permanent;
}
# enforce NO www
if ($host ~* ^www\.(.*))
{
set $host_without_www $1;
rewrite ^/(.*)$ $scheme://$host_without_www/$1 permanent;
}
# catch all
# error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Felipo Antonoff CEO da Codemarket e Desenvolvedor Web.
Modificações, integrações, consultoria e criação de melhorias sob demanda para o Opencart com mais de 8 anos de experiência.
Codemarket: https://www.codemarket.com.br
