slon362 Posted May 31, 2012 Share Posted May 31, 2012 Как включить seo url для opencart. с апачем понятно, как сделать для nginx? Link to comment Share on other sites More sharing options...
Vladzimir Posted May 31, 2012 Share Posted May 31, 2012 У вас nginx, проксирует запросы к апачу или нет. Если проксирует,то настройки не должны ничем существенным отличаться. Link to comment Share on other sites More sharing options... slon362 Posted May 31, 2012 Author Share Posted May 31, 2012 У вас nginx, проксирует запросы к апачу или нет. Если проксирует,то настройки не должны ничем существенным отличаться.нету апача Link to comment Share on other sites More sharing options... Vladzimir Posted June 1, 2012 Share Posted June 1, 2012 Если Вы любите данные "извращения", то должны в этом разбираться. Link to comment Share on other sites More sharing options... Yesvik Posted June 2, 2012 Share Posted June 2, 2012 location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?_route_=$1 break; } } Link to comment Share on other sites More sharing options... slon362 Posted June 4, 2012 Author Share Posted June 4, 2012 location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?_route_=$1 break; } } Это в локейшене сайта прописывать или ngninx.conf? Если сайта Там уже есть location PHP в него добавить или ниже дописать? Link to comment Share on other sites More sharing options... slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 если прописывать в локейшене сайта ваш конфигн, то seo страницы начинают не отображатся а запускаются как файл. Нашел код "rewrite ^/(.+)$ /index.php?_route_=$1 last;" он отлично работает, за исключением очень большого минуса, перестает заходить админка, как с этим боротся? ЗЫ у меня нет окончания на страницах .html если это важно. Link to comment Share on other sites More sharing options... slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 Если Вы любите данные "извращения", то должны в этом разбираться.В чем извращение? Link to comment Share on other sites More sharing options... Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 В чем извращение?Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Разобрался. В итоге конфиг стал похож не это: http://adamantsys.com/content/nginx-opencart-rules Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику.Почему? Насколько я понял в высоконагруженных платформах апач не используется ведь? Link to comment Share on other sites More sharing options... Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 Да, скорее всего не используется, но те кто использует не задает такие вопросы как Вы, а довольствуется связкой NGINX(фронтенд)+Apache(бекенд) и это достаточно за глаза. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Теперь новые грабли, более интересные. Если задать seo имя в категории и не задать его в подкатегории то эта подкатегория не открывается. Это особенность движка или это бага? Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Да не мучайтесь Вы так, поставьте бекендом апач и усё заработает. Link to comment Share on other sites More sharing options... slon362 Posted June 8, 2012 Author Share Posted June 8, 2012 deadcow помог, но хочется понять в чем грабли без этого всетаки. Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Все логично. Ссылки строятся по порядку с соблюдением иерархии. Если категория с ЧПУ а подкатегория нет, то что прикажете сделать скрипту? Отсюда и неработоспособность. Link to comment Share on other sites More sharing options... pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
slon362 Posted May 31, 2012 Author Share Posted May 31, 2012 У вас nginx, проксирует запросы к апачу или нет. Если проксирует,то настройки не должны ничем существенным отличаться.нету апача Link to comment Share on other sites More sharing options...
Vladzimir Posted June 1, 2012 Share Posted June 1, 2012 Если Вы любите данные "извращения", то должны в этом разбираться. Link to comment Share on other sites More sharing options... Yesvik Posted June 2, 2012 Share Posted June 2, 2012 location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?_route_=$1 break; } } Link to comment Share on other sites More sharing options... slon362 Posted June 4, 2012 Author Share Posted June 4, 2012 location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?_route_=$1 break; } } Это в локейшене сайта прописывать или ngninx.conf? Если сайта Там уже есть location PHP в него добавить или ниже дописать? Link to comment Share on other sites More sharing options... slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 если прописывать в локейшене сайта ваш конфигн, то seo страницы начинают не отображатся а запускаются как файл. Нашел код "rewrite ^/(.+)$ /index.php?_route_=$1 last;" он отлично работает, за исключением очень большого минуса, перестает заходить админка, как с этим боротся? ЗЫ у меня нет окончания на страницах .html если это важно. Link to comment Share on other sites More sharing options... slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 Если Вы любите данные "извращения", то должны в этом разбираться.В чем извращение? Link to comment Share on other sites More sharing options... Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 В чем извращение?Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Разобрался. В итоге конфиг стал похож не это: http://adamantsys.com/content/nginx-opencart-rules Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику.Почему? Насколько я понял в высоконагруженных платформах апач не используется ведь? Link to comment Share on other sites More sharing options... Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 Да, скорее всего не используется, но те кто использует не задает такие вопросы как Вы, а довольствуется связкой NGINX(фронтенд)+Apache(бекенд) и это достаточно за глаза. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Теперь новые грабли, более интересные. Если задать seo имя в категории и не задать его в подкатегории то эта подкатегория не открывается. Это особенность движка или это бага? Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Да не мучайтесь Вы так, поставьте бекендом апач и усё заработает. Link to comment Share on other sites More sharing options... slon362 Posted June 8, 2012 Author Share Posted June 8, 2012 deadcow помог, но хочется понять в чем грабли без этого всетаки. Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Все логично. Ссылки строятся по порядку с соблюдением иерархии. Если категория с ЧПУ а подкатегория нет, то что прикажете сделать скрипту? Отсюда и неработоспособность. Link to comment Share on other sites More sharing options... pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
Yesvik Posted June 2, 2012 Share Posted June 2, 2012 location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?_route_=$1 break; } } Link to comment Share on other sites More sharing options... slon362 Posted June 4, 2012 Author Share Posted June 4, 2012 location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?_route_=$1 break; } } Это в локейшене сайта прописывать или ngninx.conf? Если сайта Там уже есть location PHP в него добавить или ниже дописать? Link to comment Share on other sites More sharing options... slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 если прописывать в локейшене сайта ваш конфигн, то seo страницы начинают не отображатся а запускаются как файл. Нашел код "rewrite ^/(.+)$ /index.php?_route_=$1 last;" он отлично работает, за исключением очень большого минуса, перестает заходить админка, как с этим боротся? ЗЫ у меня нет окончания на страницах .html если это важно. Link to comment Share on other sites More sharing options... slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 Если Вы любите данные "извращения", то должны в этом разбираться.В чем извращение? Link to comment Share on other sites More sharing options... Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 В чем извращение?Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Разобрался. В итоге конфиг стал похож не это: http://adamantsys.com/content/nginx-opencart-rules Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику.Почему? Насколько я понял в высоконагруженных платформах апач не используется ведь? Link to comment Share on other sites More sharing options... Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 Да, скорее всего не используется, но те кто использует не задает такие вопросы как Вы, а довольствуется связкой NGINX(фронтенд)+Apache(бекенд) и это достаточно за глаза. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Теперь новые грабли, более интересные. Если задать seo имя в категории и не задать его в подкатегории то эта подкатегория не открывается. Это особенность движка или это бага? Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Да не мучайтесь Вы так, поставьте бекендом апач и усё заработает. Link to comment Share on other sites More sharing options... slon362 Posted June 8, 2012 Author Share Posted June 8, 2012 deadcow помог, но хочется понять в чем грабли без этого всетаки. Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Все логично. Ссылки строятся по порядку с соблюдением иерархии. Если категория с ЧПУ а подкатегория нет, то что прикажете сделать скрипту? Отсюда и неработоспособность. Link to comment Share on other sites More sharing options... pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
slon362 Posted June 4, 2012 Author Share Posted June 4, 2012 location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?_route_=$1 break; } } Это в локейшене сайта прописывать или ngninx.conf? Если сайта Там уже есть location PHP в него добавить или ниже дописать? Link to comment Share on other sites More sharing options...
slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 если прописывать в локейшене сайта ваш конфигн, то seo страницы начинают не отображатся а запускаются как файл. Нашел код "rewrite ^/(.+)$ /index.php?_route_=$1 last;" он отлично работает, за исключением очень большого минуса, перестает заходить админка, как с этим боротся? ЗЫ у меня нет окончания на страницах .html если это важно. Link to comment Share on other sites More sharing options...
slon362 Posted June 5, 2012 Author Share Posted June 5, 2012 Если Вы любите данные "извращения", то должны в этом разбираться.В чем извращение? Link to comment Share on other sites More sharing options...
Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 В чем извращение?Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Разобрался. В итоге конфиг стал похож не это: http://adamantsys.com/content/nginx-opencart-rules Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику.Почему? Насколько я понял в высоконагруженных платформах апач не используется ведь? Link to comment Share on other sites More sharing options... Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 Да, скорее всего не используется, но те кто использует не задает такие вопросы как Вы, а довольствуется связкой NGINX(фронтенд)+Apache(бекенд) и это достаточно за глаза. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Теперь новые грабли, более интересные. Если задать seo имя в категории и не задать его в подкатегории то эта подкатегория не открывается. Это особенность движка или это бага? Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Да не мучайтесь Вы так, поставьте бекендом апач и усё заработает. Link to comment Share on other sites More sharing options... slon362 Posted June 8, 2012 Author Share Posted June 8, 2012 deadcow помог, но хочется понять в чем грабли без этого всетаки. Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Все логично. Ссылки строятся по порядку с соблюдением иерархии. Если категория с ЧПУ а подкатегория нет, то что прикажете сделать скрипту? Отсюда и неработоспособность. Link to comment Share on other sites More sharing options... pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Разобрался. В итоге конфиг стал похож не это: http://adamantsys.com/content/nginx-opencart-rules Link to comment Share on other sites More sharing options...
slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Nginx без Апача. Каждый должен делать свое дело. Апач обрабатывать динамику, Nginx - статику.Почему? Насколько я понял в высоконагруженных платформах апач не используется ведь? Link to comment Share on other sites More sharing options...
Vladzimir Posted June 7, 2012 Share Posted June 7, 2012 Да, скорее всего не используется, но те кто использует не задает такие вопросы как Вы, а довольствуется связкой NGINX(фронтенд)+Apache(бекенд) и это достаточно за глаза. Link to comment Share on other sites More sharing options... slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Теперь новые грабли, более интересные. Если задать seo имя в категории и не задать его в подкатегории то эта подкатегория не открывается. Это особенность движка или это бага? Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Да не мучайтесь Вы так, поставьте бекендом апач и усё заработает. Link to comment Share on other sites More sharing options... slon362 Posted June 8, 2012 Author Share Posted June 8, 2012 deadcow помог, но хочется понять в чем грабли без этого всетаки. Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Все логично. Ссылки строятся по порядку с соблюдением иерархии. Если категория с ЧПУ а подкатегория нет, то что прикажете сделать скрипту? Отсюда и неработоспособность. Link to comment Share on other sites More sharing options... pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
slon362 Posted June 7, 2012 Author Share Posted June 7, 2012 Теперь новые грабли, более интересные. Если задать seo имя в категории и не задать его в подкатегории то эта подкатегория не открывается. Это особенность движка или это бага? Link to comment Share on other sites More sharing options...
Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Да не мучайтесь Вы так, поставьте бекендом апач и усё заработает. Link to comment Share on other sites More sharing options... slon362 Posted June 8, 2012 Author Share Posted June 8, 2012 deadcow помог, но хочется понять в чем грабли без этого всетаки. Link to comment Share on other sites More sharing options... Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Все логично. Ссылки строятся по порядку с соблюдением иерархии. Если категория с ЧПУ а подкатегория нет, то что прикажете сделать скрипту? Отсюда и неработоспособность. Link to comment Share on other sites More sharing options... pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
slon362 Posted June 8, 2012 Author Share Posted June 8, 2012 deadcow помог, но хочется понять в чем грабли без этого всетаки. Link to comment Share on other sites More sharing options...
Vladzimir Posted June 8, 2012 Share Posted June 8, 2012 Все логично. Ссылки строятся по порядку с соблюдением иерархии. Если категория с ЧПУ а подкатегория нет, то что прикажете сделать скрипту? Отсюда и неработоспособность. Link to comment Share on other sites More sharing options... pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare × Create New... Important Information On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice. I accept
pashast Posted June 8, 2012 Share Posted June 8, 2012 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. server { listen 80; server_name sait.com www.sait.com; root /home/pashast/sait.com; access_log /var/log/nginx/sait.com.access.log; error_log /var/log/nginx/sait.com.error.log error; index index.php; location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /.ht { deny all; } location ~* (.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location ~ .php$ { fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } } Link to comment Share on other sites More sharing options... 1 year later... valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options... pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Alta — тема для админ панели By impulze100500 Sorting modules in layout Drag&Drop By markimax Additional services for SAP modules By S_A_P Opencart ChatGPT - artificial intelligence content generator By kabantejay Custom Email By Parallax
valdocco Posted January 31, 2014 Share Posted January 31, 2014 Можете все-таки выложить итоговый работоспособный конфиг nginx для работы с SEO ссылками? Link to comment Share on other sites More sharing options...
pashast Posted January 31, 2014 Share Posted January 31, 2014 Мой не работает? Или что? Link to comment Share on other sites More sharing options... 5 months later... sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Реклама и продвижение SEO-вопросы (оптимизация и продвижение магазина) nginx + seo
sobwoofer Posted July 7, 2014 Share Posted July 7, 2014 Вот не помню где нарыл, пачка сайтов крутится без проблем с такими конфигами. Спасибо большое, с вашим конфигом заработало все, Использую Ubuntu 12.04+nginx+PHP FPM на DigitalOcean Link to comment Share on other sites More sharing options... 2 months later... Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options... 5 months later... aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options... afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0 Go to topic listing Similar Content Seo pro ocStore By NGrey, May 18, 2022 8 replies 773 views spectre Wednesday at 08:06 PM SEO мультиязык PRO By markimax, October 9, 2022 0 comments 4,392 views markimax October 9, 2022 SEO мультиязык / мультирегион By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 0 comments 98,277 views markimax April 19, 2016 [Поддержка] SEO мультиязык / мультирегион 1 2 3 4 72 By markimax, April 19, 2016 мультиязык пагинация (and 4 more) Tagged with: мультиязык пагинация регионы города мультирегион мультимагазин 1,787 replies 173,286 views markimax Wednesday at 10:35 AM Нужен человек для наполнения и SEO магазина. By VitPog66, November 2, 2022 6 replies 620 views kabantejay Monday at 10:31 PM Recently Browsing 0 members No registered users viewing this page.
Allex Posted September 10, 2014 Share Posted September 10, 2014 ... fastcgi_param SCRIPT_FILENAME /home/pashast/sait.com$fastcgi_script_name; Лучше fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Link to comment Share on other sites More sharing options...
aeirina Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } Зачем это условие нужно? Если выше в конфиге уже есть конструкция: location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } Link to comment Share on other sites More sharing options...
afwollis Posted February 21, 2015 Share Posted February 21, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Link to comment Share on other sites More sharing options... aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options... 6 months later... zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options... Prev 1 2 Next Page 1 of 2 Create an account or sign in to comment You need to be a member in order to leave a comment Create an account Sign up for a new account in our community. It's easy! Register a new account Sign in Already have an account? Sign in here. Sign In Now Share More sharing options... Followers 0
aeirina Posted February 22, 2015 Share Posted February 22, 2015 if (!-e $request_filename)чтобы ваши реальные файлы не полетели вслед за редиректом. Так директива try_files как раз и проверяет существует ли запрашиваемый файл, если нет тогда идет редирект. Или я что не так понимаю, объясните поподробнее, можно даже с примерами думаю будет многим полезно. Не судите строго я в этом новичок. :unsure:Данный вопрос возник, когда понадобилось подключить модуль google sitemap и прописать в конфиге рерайт с /sitemap.xml на /index.php?route=feed/google_sitemap На что данный if не давал возможности осуществить правильный редирект, хотя было прописано явно: location = /sitemap.xml {rewrite ^/(.+)$ /index.php?route=feed/google_sitemap last;} Link to comment Share on other sites More sharing options...
zoolos Posted August 22, 2015 Share Posted August 22, 2015 (edited) админка так и не грузится, может кто подскажет что вставить и куда? сео работает стоит убунту 14 nginx + ispConfig3 Апача нету конфиг: server { listen *:80; server_name cr.com www.cr.com; root /var/www/cr.com/web; index index.html index.htm index.php index.cgi index.pl index.xhtml; error_page 400 /error/400.html; error_page 401 /error/401.html; error_page 403 /error/403.html; error_page 404 /error/404.html; error_page 405 /error/405.html; error_page 500 /error/500.html; error_page 502 /error/502.html; error_page 503 /error/503.html; recursive_error_pages on; location = /error/400.html { internal; } location / { try_files $uri @opencart; } location @opencart { rewrite ^/(.+)$ /index.php?_route_=$1 last; } location ~ /\.ht { deny all; } location ~* (\.(tpl|ini))$ { deny all; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?_route_=$1 last; } location /admin { index index.php; } location ~* .(js|css|ico|xml|swf|flv|eot|ttf|woff|pdf|xls|htc)$ { add_header Pragma "public"; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; log_not_found off; expires 90d; } location ~* .(jpg|jpeg|gif|css|png)$ { access_log off; expires 10d; } location = /error/401.html { internal; } location = /error/403.html { internal; } location = /error/404.html { internal; } location = /error/405.html { internal; } location = /error/500.html { internal; } location = /error/502.html { internal; } location = /error/503.html { internal; } error_log /var/log/ispconfig/httpd/cr.com/error.log; access_log /var/log/ispconfig/httpd/cr.com/access.log combined; location ~ /\. { deny all; access_log off; log_not_found off; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location /stats/ { index index.html index.php; auth_basic "Members Only"; auth_basic_user_file /var/www/clients/client0/web1/web/stats/.htpasswd_stats; } location ^~ /awstats-icon { alias /usr/share/awstats/icon; } location ~ \.php$ { try_files /6a5333782f654bb3be0c8f68623c5721.htm @php; } location @php { try_files $uri =404; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/var/lib/php5-fpm/web1.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } } Edited August 22, 2015 by zoolos Link to comment Share on other sites More sharing options...
Recommended Posts