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
Opencart ЧПУ ubuntu 16.04 php7
Opencart ЧПУ ubuntu 16.04 php7
ни один из вариантов конфигов запуска на nginx не дает включить ЧПУ. есть у кого нибудь рабочий конфиг этой связки - vestacp-ubuntu 16.04 php7 https
Re: Opencart ЧПУ ubuntu 16.04 php7
Как-то непонятно вы вопрос описали: "...ЧПУ... HTTPS" чпу и ssl никак не связаны меж собой
Re: Opencart ЧПУ ubuntu 16.04 php7
Какая версия OpenCart ?
-
- Posts: 31
- Joined: Fri Apr 07, 2017 2:03 pm
Re: Opencart ЧПУ ubuntu 16.04 php7
Для корректой работы ЧПУ нужен Apach, php-fpm не годится. Потому как за ЧПУ отвечает модуль mod_rewrite Апача.
Но если сильно хотите, то хорошенько поищите на форуме, эта тема была где то.
Но если сильно хотите, то хорошенько поищите на форуме, эта тема была где то.
-
- Posts: 8
- Joined: Fri Feb 10, 2017 6:24 pm
- Contact:
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Opencart ЧПУ ubuntu 16.04 php7
Моя версия:
И ЧПУ прекрасно работают без apache.
opencart.tplShow
Code: Select all
server {
listen %ip%:%web_port%;
server_name %domain_idn% %alias_idn%;
return 301 https://%domain_idn%$request_uri;
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
}
opencart.stplShow
Code: Select all
server {
listen %ip%:%web_ssl_port% http2 ssl;
server_name %alias_idn%;
return 301 https://%domain_idn%$request_uri;
ssl on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
}
server {
listen %ip%:%web_ssl_port% http2 ssl;
server_name %domain_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;
ssl on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files $uri $uri/ @opencart;
location ~ \.php$ {
try_files $uri $uri/ =404;
fastcgi_pass %backend_lsnr%;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^.+\.(rss|atom|jpg|jpeg|gif|png|bmp|ico|js|css|woff|ttf|otf|svg|woff2|eot|txt)$ {
expires max;
}
}
location @opencart {
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
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|ht|svn|git|hg|bzr)$" {
deny all;
return 404;
}
location /vstats/ {
alias %home%/%user%/web/%domain%/stats/;
include %home%/%user%/conf/web/%domain%.auth*;
}
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_idn%.conf*;
include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt;
}
Re: Opencart ЧПУ ubuntu 16.04 php7
denisemenov wrote:Моя версия:opencart.tplShowCode: Select all
server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; return 301 https://%domain_idn%$request_uri; include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt; }
И ЧПУ прекрасно работают без apache.opencart.stplShowCode: Select all
server { listen %ip%:%web_ssl_port% http2 ssl; server_name %alias_idn%; return 301 https://%domain_idn%$request_uri; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; } server { listen %ip%:%web_ssl_port% http2 ssl; server_name %domain_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; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location / { try_files $uri $uri/ @opencart; location ~ \.php$ { try_files $uri $uri/ =404; fastcgi_pass %backend_lsnr%; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location ~* ^.+\.(rss|atom|jpg|jpeg|gif|png|bmp|ico|js|css|woff|ttf|otf|svg|woff2|eot|txt)$ { expires max; } } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } 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|ht|svn|git|hg|bzr)$" { deny all; return 404; } location /vstats/ { alias %home%/%user%/web/%domain%/stats/; include %home%/%user%/conf/web/%domain%.auth*; } 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_idn%.conf*; include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt; }
Кстати, начиная с версия 2.3 необходимы еще правки шаблонов для ограничений open_base_dir , за рпеделы рутдира выносится часть ресурсов опенкаррта
Re: Opencart ЧПУ ubuntu 16.04 php7
Какие именно правки нужны?ahouse wrote: ↑Mon Jan 08, 2018 1:36 pmdenisemenov wrote:Моя версия:opencart.tplShowCode: Select all
server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; return 301 https://%domain_idn%$request_uri; include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt; }
И ЧПУ прекрасно работают без apache.opencart.stplShowCode: Select all
server { listen %ip%:%web_ssl_port% http2 ssl; server_name %alias_idn%; return 301 https://%domain_idn%$request_uri; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; } server { listen %ip%:%web_ssl_port% http2 ssl; server_name %domain_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; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location / { try_files $uri $uri/ @opencart; location ~ \.php$ { try_files $uri $uri/ =404; fastcgi_pass %backend_lsnr%; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location ~* ^.+\.(rss|atom|jpg|jpeg|gif|png|bmp|ico|js|css|woff|ttf|otf|svg|woff2|eot|txt)$ { expires max; } } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } 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|ht|svn|git|hg|bzr)$" { deny all; return 404; } location /vstats/ { alias %home%/%user%/web/%domain%/stats/; include %home%/%user%/conf/web/%domain%.auth*; } 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_idn%.conf*; include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt; }
Кстати, начиная с версия 2.3 необходимы еще правки шаблонов для ограничений open_base_dir , за рпеделы рутдира выносится часть ресурсов опенкаррта
Re: Opencart ЧПУ ubuntu 16.04 php7
Вот мои шаблон. Опенкарт юзает разные фреймверки (он сам и его модлуи), а эти фреймверки в целях безопасности вынесены за open_base_dirone wrote: ↑Tue Feb 27, 2018 6:25 pmКакие именно правки нужны?ahouse wrote: ↑Mon Jan 08, 2018 1:36 pmdenisemenov wrote:Моя версия:opencart.tplShowCode: Select all
server { listen %ip%:%web_port%; server_name %domain_idn% %alias_idn%; return 301 https://%domain_idn%$request_uri; include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt; }
И ЧПУ прекрасно работают без apache.opencart.stplShowCode: Select all
server { listen %ip%:%web_ssl_port% http2 ssl; server_name %alias_idn%; return 301 https://%domain_idn%$request_uri; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; } server { listen %ip%:%web_ssl_port% http2 ssl; server_name %domain_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; ssl on; ssl_certificate %ssl_pem%; ssl_certificate_key %ssl_key%; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location / { try_files $uri $uri/ @opencart; location ~ \.php$ { try_files $uri $uri/ =404; fastcgi_pass %backend_lsnr%; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location ~* ^.+\.(rss|atom|jpg|jpeg|gif|png|bmp|ico|js|css|woff|ttf|otf|svg|woff2|eot|txt)$ { expires max; } } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } 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|ht|svn|git|hg|bzr)$" { deny all; return 404; } location /vstats/ { alias %home%/%user%/web/%domain%/stats/; include %home%/%user%/conf/web/%domain%.auth*; } 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_idn%.conf*; include %home%/%user%/conf/web/*nginx.%domain_idn%.conf_letsencrypt; }
Кстати, начиная с версия 2.3 необходимы еще правки шаблонов для ограничений open_base_dir , за рпеделы рутдира выносится часть ресурсов опенкаррта
Code: Select all
<VirtualHost %ip%:%web_port%>
ServerName %domain_idn%
%alias_string%
ServerAdmin %email%
DocumentRoot %docroot%
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
#SuexecUserGroup %user% %group%
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
<Directory %docroot%>
AllowOverride All
Options +Includes -Indexes +ExecCGI
php_admin_value upload_max_filesize 10M
php_admin_value max_execution_time 20
php_admin_value post_max_size 8M
php_admin_value memory_limit 32M
php_admin_flag mysql.allow_persistent off
php_admin_flag safe_mode off
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f info@%domain_idn%"
php_admin_value open_basedir %docroot%:%home%/%user%/tmp:%home%/%user%/web/%domain%/private:/bin:/usr/bin:/usr/local/bin:/var/www/html:/tmp:/usr/share:/etc/phpMyAdmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcubemail:/etc/roundcube:/var/lib/roundcube
php_admin_value upload_tmp_dir %home%/%user%/tmp
php_admin_value session.save_path %home%/%user%/tmp
</Directory>
<Directory %home%/%user%/web/%domain%/stats>
AllowOverride All
</Directory>
<IfModule mod_ruid2.c>
RMode config
RUidGid %user% %group%
RGroups www-data
</IfModule>
<IfModule itk.c>
AssignUserID %user% %group%
</IfModule>
IncludeOptional %home%/%user%/conf/web/%web_system%.%domain%.conf*
</VirtualHost>