metalshop
06.03.2019 08:35
0
Здравствуйте!
Ни как не удаётся настроить чпу на Opencart 1.5.5.1.2.
Режим работы PHP – FastCGI (Nginx + PHP-FPM)
версия php 5.6.38
Тестовый сайт drauthran.tk

с базовым конфигом открывается только главная.
сделал как пишут на форумах –не работает. скачивается index.php и всё.

server {
        server_name drauthran.tk www.drauthran.tk;
        charset UTF-8;
        index index.php index.html;
        disable_symlinks if_not_owner from=$root_path;
        include /etc/nginx/vhosts-includes/*.conf;
        include /etc/nginx/vhosts-resources/drauthran.tk/*.conf;
        access_log /var/www/httpd-logs/drauthran.tk.access.log;
        error_log /var/www/httpd-logs/drauthran.tk.error.log notice;
        ssi on;
        set $root_path /var/www/drauthran/data/www/drauthran.tk;
        root $root_path;

    location / {
            try_files $uri @opencart;
    }
 
    location @opencart {
            rewrite ^/(.+)$ /index.php?_route_=$1 last;
    }


        listen 185.65.247.88:80;
        listen [2a05:480:0:f758::2]:80;
        location @php {
                fastcgi_index index.php;
                fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@drauthran.tk";
                fastcgi_pass unix:/var/www/php-fpm/drauthran.sock;
                fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
                try_files $uri =404;
                include fastcgi_params;
        }
}


Кто-то сталкивался? Куда копать как решить проблему?
Artem.M
06.03.2019 12:33
1
Добрый день. Еще актуально? Потому что сейчас сайт работает.
metalshop
06.03.2019 14:44
0
Не понятно. Не знаю из-за чего конкретно он заработал. Вроде я только поменял версию php на 7.0.33.
Тестовый чистый опенкарт работает, но на основном настроить не получается.
Попробую сделать копию основного сайта.
metalshop
06.03.2019 15:18
0
Добрый день. Еще актуально? Потому что сейчас сайт работает.© Artem.M


Добрый день! Не заметил две секции server {} вписал нужные строчки, вроде работает. Разбираюсь с админкой. Теперь скачивается адмика :(
тестовый сайт – test.drauthran.tk

Режим работы PHP: FastCGI (Nginx + PHP-FPM)
Версия PHP: 7.0.33 (native)

Конфигурационный файл nginx:
server {
        server_name test.drauthran.tk www.test.drauthran.tk;
        charset UTF-8;
        index index.php index.html;
        disable_symlinks if_not_owner from=$root_path;
        include /etc/nginx/vhosts-includes/*.conf;
        include /etc/nginx/vhosts-resources/test.drauthran.tk/*.conf;
        access_log /var/www/httpd-logs/test.drauthran.tk.access.log;
        error_log /var/www/httpd-logs/test.drauthran.tk.error.log notice;
        ssi on;
        set$root_path /var/www/drauthran/data/www/test.drauthran.tk;
        root $root_path;

        location / {
            try_files $uri @opencart;
                location ~ [^/]\.ph(p\d*|tml)$ {
                        try_files /does_not_exists @php;
                }
        }
        location @opencart {
            rewrite ^/(.+)$ /index.php?_route_=$1 last;
    }
    location /admin {
        index index.php;
    }

        listen 185.65.247.88:80;
        listen [2a05:480:0:f758::2]:80;
        location @php {
                fastcgi_index index.php;
                fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@test.drauthran.tk";
                fastcgi_pass unix:/var/www/php-fpm/drauthran.sock;
                fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
                try_files $uri =404;
                include fastcgi_params;
        }
}
server {
        server_name test.drauthran.tk www.test.drauthran.tk;
        ssl_certificate "/var/www/httpd-cert/drauthran/test.drauthran.tk_le1.crtca";
        ssl_certificate_key "/var/www/httpd-cert/drauthran/test.drauthran.tk_le1.key";
        ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
        ssl_prefer_server_ciphers on;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
        charset UTF-8;
        index index.php index.html;
        disable_symlinks if_not_owner from=$root_path;
        include /etc/nginx/vhosts-includes/*.conf;
        include /etc/nginx/vhosts-resources/test.drauthran.tk/*.conf;
        access_log /var/www/httpd-logs/test.drauthran.tk.access.log;
        error_log /var/www/httpd-logs/test.drauthran.tk.error.log notice;
        ssi on;
        set$root_path /var/www/drauthran/data/www/test.drauthran.tk;
        root $root_path;
       
        location / {
            try_files $uri @opencart;
                location ~ [^/]\.ph(p\d*|tml)$ {
                        try_files /does_not_exists @php;
                }
        }
        location @opencart {
            rewrite ^/(.+)$ /index.php?_route_=$1 last;
    }
    location /admin {
        index index.php;
    }

        listen 185.65.247.88:443 ssl;
        listen [2a05:480:0:f758::2]:443 ssl;
        location @php {
                fastcgi_index index.php;
                fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@test.drauthran.tk";
                fastcgi_pass unix:/var/www/php-fpm/drauthran.sock;
                fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
                try_files $uri =404;
                include fastcgi_params;
        }
}
Artem.M
06.03.2019 20:49
0
Поправил Вам чуть конфиг, только он урезанный. Добавите остальное. С вкладки инкогнито проверьте test.drauthran.tk/admin/
Старый конфиг сохранен в той же директории.
metalshop
07.03.2019 09:27
0
Поправил Вам чуть конфиг, только он урезанный. Добавите остальное. С вкладки инкогнито проверьте Авторизация
Старый конфиг сохранен в той же директории.
© Artem.M


Спасибо! Не пойму где конфиги:)
Artem.M
07.03.2019 11:36
0
Оригинал в каталоге /etc/nginx/vhosts/drauthran/test.drauthran.tk.conf1 , а текущий конфиг /etc/nginx/vhosts/drauthran/test.drauthran.tk.conf
metalshop
07.03.2019 16:33
0
Оригинал в каталоге© Artem.M

Спасибо за помощь!
metalshop
10.02.2022 12:14
0
Здравствуйте! Опять та же проблема – скачивается index.php вместо админки.
Разобрался сам, вопрос отпадает)
Тема закрита.