We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
Vesta CP config Nginx + php fpm шаблон для Opencart
Vesta CP config Nginx + php fpm шаблон для Opencart
Всем привет!
Кто-то может поделится шаблоном nginx для Opencart 2.x для конфига nginx + php fpm?
Кто-то может поделится шаблоном nginx для Opencart 2.x для конфига nginx + php fpm?
Re: Vesta CP config Nginx + php fpm шаблон для Opencart
В принципе, если нужно часто, то можно добавить в стандартную поставку.Baggio824 wrote:Кто-то может поделится шаблоном nginx для Opencart 2.x для конфига nginx + php fpm?
Если не сложно, добавьте идею - https://bugs.vestacp.com
Re: Vesta CP config Nginx + php fpm шаблон для Opencart
Да один сервер локальный, другой будет открыт в интернет.
Re: Vesta CP config Nginx + php fpm шаблон для Opencart
И вам спасибо! Буду ждать с нетерпением :)
Re: Vesta CP config Nginx + php fpm шаблон для Opencart
Ок, принято.Baggio824 wrote:И вам спасибо! Буду с нетерпением ждать :)
Но лучше с терпением, чем с нетерпением :)
Re: Vesta CP config Nginx + php fpm шаблон для Opencart
Список рецептов на будущее
https://www.nginx.com/resources/wiki/start/
https://www.nginx.com/resources/wiki/start/
Re: Vesta CP config Nginx + php fpm шаблон для Opencart
Ну как выяснилось с Joomla, там основные, так сказать, примеры и со свежими версиями напильник все равно нужен.darwin wrote:Список рецептов на будущее
https://www.nginx.com/resources/wiki/start/
Re: Vesta CP config Nginx + php fpm шаблон для Opencart
Создал и протестировал файл конфига для входа по http протоколу CMS Opencart 2.x. Тестирование на СЕО ссылки не проводил. Работает на версии 2.0.3.1, должен поддерживать версии выше.
Создаём opencart.tpl и помещаем его по пути: /usr/local/vesta/data/templates/web/nginx/php5-fpm
Если не отображается, невозможно выбрать opencart, в панели управления создаём также файл opencart.stpl, в который помещаем default.tpl конфиг.
opencart.tpl:
файл opencart.stpl для протокола https ещё в процессе создания.
Чтобы убрать index.php?route=common/home
добавляем между:
location / { и }
Создаём opencart.tpl и помещаем его по пути: /usr/local/vesta/data/templates/web/nginx/php5-fpm
Если не отображается, невозможно выбрать opencart, в панели управления создаём также файл opencart.stpl, в который помещаем default.tpl конфиг.
opencart.tpl:
Code: Select all
server {
listen %ip%:%web_port%;
server_name %domain_idn% %alias_idn%;
root %docroot%;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/%domain%.log combined;
access_log /var/log/nginx/domains/%domain%.bytes bytes;
error_log /var/log/nginx/domains/%domain%.error.log error;
location / {
try_files $uri @opencart;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass %backend_lsnr%;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
location /admin {
index index.php;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
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;
location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;
include %home%/%user%/conf/web/nginx.%domain%.conf*;
}
Чтобы убрать index.php?route=common/home
добавляем между:
location / { и }
Code: Select all
if ($query_string ~ "^route=common/home$"){
rewrite ^/index\.php$ http://$http_host? redirect;
}