MK
Size: a a a
MK
ВМ
ВМ
MK
MK
АП
ВМ
ВМ
ВМ
MK
MK
MK
server {
listen 80;
index index.php index.html;
server_name localhost;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /var/www/mma/htdocs;
charset UTF-8;
map $request_uri $opencart_route {
default '';
"~^/([^?]*)" $1;
}
if ($request_uri ~ ^([^\?]*)/index\.(html|php)) {
return 308 $1/$is_args$args;
}
location / {
try_files $uri $uri/ /index.php?_route_=$opencart_route&$args;
location ~ (?i)((\.tpl|.twig|\.ini|\.log|(?<!robots)\.txt)) { internal; }
location ~* \.(jpe?g|png|tiff|gif|webp|xml|html|yml|ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|rss|atom|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|rtf|pdf|txt|js|css|bmp|pnm|pbm|ppm)$ {
access_log off;
expires epoch;
}
location ~ ^/(.*)/$ {
return 301 /$1$is_args$args;
}
}
location /api/ { try_files $uri $uri/ /index.php?_route_=$opencart_route&$args; }
location = /sitemap.xml { try_files $uri /index.php?route=extension/feed/google_sitemap; }
location = /googlebase.xml { try_files $uri /index.php?route=extension/feed/google_base; }
location ^~ /system/storage/ { internal; }
location /admin {
index index.php;
}
location / {
try_files $uri @opencart;
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
ВМ
ВМ
ВМ
ВМ
ВМ
ВМ
ВМ
ВМ