Ошибка с ЧПУ nginx -> apach

wimexs

Постоялец
Регистрация
21 Авг 2009
Сообщения
158
Реакции
28
После переноса сайта на VPS opencart Version 2.1.0.1 (rs.2) при переходе по некоторым товарам выдаётся ошибка 404 которая отдаётся сервером Nginx. Урл по которому переходиться в базе есть и прописан роут.

Стандартная страница работает только на не существующие страницы.

Кто что посоветует.
 
Не он даже с отключенным кешем таже беда. Как только добавляешь заново товар этот же с тем же урлом, всё норм становиться.
 
Не помогает, пробывали уже.
 
Код:
# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: http://www.opencart.com

Options +SymLinksIfOwnerMatch

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>

<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</IfModule>


# SEO URL Settings
RewriteEngine On

# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$       index.php?route=feed/google_sitemap [L]
RewriteRule ^ru/sitemap.xml$ ru/index.php?route=feed/google_sitemap [L]
RewriteRule ^en/sitemap.xml$ en/index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^ru/googlebase.xml$ ru/index.php?route=feed/google_base [L]
RewriteRule ^en/googlebase.xml$ en/index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

Стоит модуль SEOpro jazz Для просмотра ссылки Войди или Зарегистрируйся
 
Последнее редактирование:
Не соглашусь с Вами по поводу кеша. Числил и не раз весь кеш, модификаторов, системный, даже картинок. Не помогает.

Перейдите по ссылке Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
 
В базе посмотрел в товаре прописано правильно и в url_alias, тоже есть запись.
Пробывал перейти по роуту, тоже самое выдаёт.
 
Нет этим менеджерам нужно руки по отрывать. Они удалили товар, в обед.

Но у меня тогда вопрос может подскажите почему 404 отдаёт nginx а не опенкарт, при переходе по не существующему адресу, выводиться 404 магазина.
 
Но у меня тогда вопрос может подскажите почему 404 отдаёт nginx а не опенкарт, при переходе по не существующему адресу, выводиться 404 магазина.
А у вас точно апач есть?
Возможно надо правильно перенести роуты из htaccess в конфиг nginx?
 
А у вас точно апач есть?
Возможно надо правильно перенести роуты из htaccess в конфиг nginx?

Апач точно есть, он в связке стоит с nginx.
А что именно перенести? я выше вылаживал htaccess.
 
Назад
Сверху