Jump to content

Recommended Posts

хмм.. так давно все было.. я уже не помню что у меня сео занимается, сеопро в модулях нет, есть deadcow SEO и SEO Manager (вот я совсем чайник), не помню уже как все настраивал. похоже все работает штатными средствами osctore

Share this post


Link to post
Share on other sites

хмм.. так давно все было.. я уже не помню что у меня сео занимается, сеопро в модулях нет, есть deadcow SEO и SEO Manager (вот я совсем чайник), не помню уже как все настраивал. похоже все работает штатными средствами osctore

оно не в модулях

в настройках во вкладке сервер

Share this post


Link to post
Share on other sites

Выложите конфиг вашего виртуального хоста из папки /etc/nginx/vhosts/. Про .htaccess забудьте вообще, если вы хотите юзать связку nginx+php-fpm.

Share this post


Link to post
Share on other sites

Выложите конфиг вашего виртуального хоста из папки /etc/nginx/vhosts/. Про .htaccess забудьте вообще, если вы хотите юзать связку nginx+php-fpm.

в первом сообщении он его уже выложил

вот тут я продублировал

https://opencartforum.com/topic/60071-fastcgi-nginx-php-fpm/?do=findComment&comment=538168

Share this post


Link to post
Share on other sites

Нет, он выложил корневой конфиг (nginx.conf), в него инклудятся конфиги виртуальных хостов

include /etc/nginx/vhosts/*/*.conf;
Ему нужно выложить конфиг виртуального хоста, который отвечает за его домен, и в нём делать все настройки. Kindzaza ему правильно подсказал, где можно его посмотреть.
  • +1 1

Share this post


Link to post
Share on other sites

Вот у меня сейчас работает

#user '******' virtual host 'site.ru' configuration file
server {
server_name site.ru www.site.ru;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.php index.html;
root $root_path;
set $root_path /var/www/******/data/www/site.ru;
error_log /var/www/httpd-logs/site.ru.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;

location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}

location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
expires 180d;
log_not_found off;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
try_files $uri $uri/ @fallback;
}

if ($host ~* www\.(.*)) {
set $host_without_www $1;
rewrite ^(.*)$ http://$host_without_www$1 permanent;#301 redirect
}

if (!-e $request_filename){
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
}
location @fallback {
error_log /dev/null crit;
access_log off ;
}

location /index.html {rewrite ^(.*)$ http://site.ru/ permanent;}
location /download { rewrite ^/download/(.*) /index.php?route=error/not_found last; }
location = /sitemap.xml { rewrite ^(.*)$ /index.php?route=feed/soforp_fast_sitemap last; }# тут с sitemap сами поиграйтесь
location /sitemap { rewrite ^/sitemap([^\.]+).xml$ /index.php?route=feed/soforp_fast_sitemap&path=$1 last; }# тут с sitemap сами поиграйтесь
location ~* (\.(tpl|ini))$ { deny all; }
location ~ (?i)((\.tpl|\.ini|\.log|(?
# Vqmod settings
# Add trailing slash to */vqmod/install requests.
rewrite /vqmod/install$ $scheme://$host$uri/ permanent;

# Run index.php on /vqmod/install calls
location /vqmod/install/ {
index index.php;
}

# Nginx configuration of vqmod htaccess
location /vqmod/ {
location ~ \.(xml|cache) {
deny all;
}
}
# End Vqmod settings

# Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
location ~* \.(engine|inc|info|ini|install|log|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
}

# Do not log access to the favicon, to keep the logs cleaner
location = /favicon.ico {
log_not_found off;
access_log off;
}

# Make sure these get through
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# Fix for Firefox issue with cross site font icons
location ~* \.(eot|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}

location ~ ~$ {
access_log off;
log_not_found off;
deny all;
}

# Deny access to any files with a .php extension in these directories
# Works in sub-directory installs and also in multisite network
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~* /(?:cache|logs|image|download)/.*\.php$ {
deny all;
}

location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@site.ru";
fastcgi_pass unix:/var/www/php-fpm/******.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
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;
}
access_log off ;
gzip on;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
listen ВАШ IP:ПОРТ default_server;
}

 

Где site.ru - ваш домен, ********* - пользователь

  • +1 1

Share this post


Link to post
Share on other sites

Нет, он выложил корневой конфиг (nginx.conf), в него инклудятся конфиги виртуальных хостов

include /etc/nginx/vhosts/*/*.conf;
Ему нужно выложить конфиг виртуального хоста, который отвечает за его домен, и в нём делать все настройки. Kindzaza ему правильно подсказал, где можно его посмотреть.
дошло..

тогда по ходу ещё один момент по переадресации

выкидываем хтасес и настраиваем в конфигах перенаправления

с www понятно

а как с другими моментами? есть что об этом?

например вот такое правило?

https://opencartforum.com/topic/56464-htaccess-убрать-часть-из-url/?do=findComment&comment=538104

да и как обычно с site.ru/index.php на site.ru и т.д.

Share this post


Link to post
Share on other sites

http://prof-66.fvds.ru/index.php?route=account/login

http://prof-66.fvds.ru/index.php?route=information/sitemap

http://prof-66.fvds.ru/index.php?route=product/special

http://prof-66.fvds.ru/index.php?route=account/voucher

http://prof-66.fvds.ru/index.php?route=product/manufacturer

сеопро?

попробуйте как его отключить

походу с ЧПУ не то, что то

а по основнному домену работает всё??

основной то еще на другом серваке с аппачем работает

 

В 5-й версии ISP настройки www-домена производятся вот тут

да точно! совсем забыл.. только не могу понять все равно, что тут прописать?

#user 'dimmam' virtual host 'prof-66.ru' configuration file

server {

server_name prof-66.ru prof-66.fvds.ru www.prof-66.ru;

charset UTF-8;

disable_symlinks if_not_owner from=$root_path;

index index.html index.php;

root $root_path/$subdomain;

set $root_path /var/www/dimmam/data/www;

set $subdomain prof-66.ru;

if ($host ~* ^((.*).prof-66.ru)$) {

set $subdomain $1;

}

access_log /var/www/httpd-logs/prof-66.ru.access.log ;

error_log /var/www/httpd-logs/prof-66.ru.error.log notice;

include /etc/nginx/vhosts-includes/*.conf;

location / {

location ~ [^/]\.ph(p\d*|tml)$ {

try_files /does_not_exists @php;

}

}

location @fallback {

access_log off ;

}

location @php {

fastcgi_index index.php;

fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f profi@prof-66.ru";

fastcgi_pass unix:/var/www/php-fpm/dimmam.sock;

fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;

try_files $uri =404;

include fastcgi_params;

}

ssi on;

gzip on;

gzip_comp_level 5;

gzip_disable "msie6";

gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

listen 62.109.3.234:80;

Share this post


Link to post
Share on other sites
 

Я же выложил рабочий конфиг, сделайте по аналогии. А потом подрехтуем :-)

  • +1 1

Share this post


Link to post
Share on other sites

Я же выложил рабочий конфиг, сделайте по аналогии. А потом подрехтуем :-)

поправил, тока не могу понять, куда эту скобку поставить :(

Синтаксическая ошибка: 'nginx: [emerg] directive "location" has no opening "{" in /etc/nginx/vhosts/dimmam/prof-66.ru.conf:52 ngin

#user 'dimmam' virtual host 'prof-66.ru' configuration file

server {

server_name prof-66.ru prof-66.fvds.ru www.prof-66.ru;

charset UTF-8;

disable_symlinks if_not_owner from=$root_path;

index index.php index.html;

root $root_path/$subdomain;

set $root_path /var/www/dimmam/data/www;

set $subdomain prof-66.ru;

if ($host ~* ^((.*).prof-66.ru)$) {

set $subdomain $1;

}

error_log /var/www/httpd-logs/prof-66.ru.error.log notice;

include /etc/nginx/vhosts-includes/*.conf;

location / {

location ~ [^/]\.ph(p\d*|tml)$ {

try_files /does_not_exists @php;

}

location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {

expires 180d;

log_not_found off;

add_header Pragma public;

add_header Cache-Control "public, must-revalidate, proxy-revalidate";

try_files $uri $uri/ @fallback;

}

if ($host ~* www\.(.*)) {

set $host_without_www $1;

rewrite ^(.*)$ http://$host_without_www$1 permanent;#301 redirect

}

if (!-e $request_filename){

rewrite ^/(.+)$ /index.php?_route_=$1 last;

}

}

location @fallback {

error_log /dev/null crit;

access_log off ;

}

location /index.html {rewrite ^(.*)$ http://site.ru/ permanent;}

location /download { rewrite ^/download/(.*) /index.php?route=error/not_found last; }

location = /sitemap.xml { rewrite ^(.*)$ /index.php?route=feed/soforp_fast_sitemap last; }# тут с sitemap сами поиграйтесь

location /sitemap { rewrite ^/sitemap([^\.]+).xml$ /index.php?route=feed/soforp_fast_sitemap&path=$1 last; }# тут с sitemap сами поиграйтесь

location ~* (\.(tpl|ini))$ { deny all; }

location ~ (?i)((\.tpl|\.ini|\.log|(?

# Vqmod settings

# Add trailing slash to */vqmod/install requests.

rewrite /vqmod/install$ $scheme://$host$uri/ permanent;

# Run index.php on /vqmod/install calls

location /vqmod/install/ {

index index.php;

}

# Nginx configuration of vqmod htaccess

location /vqmod/ {

location ~ \.(xml|cache) {

deny all;

}

}

# End Vqmod settings

# Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!

location ~* \.(engine|inc|info|ini|install|log|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {

deny all;

}

# Do not log access to the favicon, to keep the logs cleaner

location = /favicon.ico {

log_not_found off;

access_log off;

}

# Make sure these get through

location = /robots.txt {

allow all;

log_not_found off;

access_log off;

}

# Fix for Firefox issue with cross site font icons

location ~* \.(eot|otf|ttf|woff)$ {

add_header Access-Control-Allow-Origin *;

}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).

# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)

location ~ /\. {

access_log off;

log_not_found off;

deny all;

}

location ~ ~$ {

access_log off;

log_not_found off;

deny all;

}

# Deny access to any files with a .php extension in these directories

# Works in sub-directory installs and also in multisite network

# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)

location ~* /(?:cache|logs|image|download)/.*\.php$ {

deny all;

}

location @php {

fastcgi_index index.php;

fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@prof-66.ru";

fastcgi_pass unix:/var/www/php-fpm/dimmam.sock;

fastcgi_split_path_info ^((?U).+\.ph(?:P\d*|tml))(/?.+)$;

try_files $uri =404;

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;

}

access_log off ;

gzip on;

gzip_comp_level 5;

gzip_disable "msie6";

gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

listen 62.109.3.234:80;

}

Share this post


Link to post
Share on other sites

поправил, тока не могу понять, куда эту скобку поставить :(

Синтаксическая ошибка: 'nginx: [emerg] directive "location" has no opening "{" in /etc/nginx/vhosts/dimmam/prof-66.ru.conf:52 ngin

#user 'dimmam' virtual host 'prof-66.ru' configuration file

server {

server_name prof-66.ru prof-66.fvds.ru www.prof-66.ru;

charset UTF-8;

disable_symlinks if_not_owner from=$root_path;

index index.php index.html;

root $root_path/$subdomain;

set $root_path /var/www/dimmam/data/www;

set $subdomain prof-66.ru;

if ($host ~* ^((.*).prof-66.ru)$) {

set $subdomain $1;

}

error_log /var/www/httpd-logs/prof-66.ru.error.log notice;

include /etc/nginx/vhosts-includes/*.conf;

location / {

location ~ [^/]\.ph(p\d*|tml)$ {

try_files /does_not_exists @php;

}

location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {

expires 180d;

log_not_found off;

add_header Pragma public;

add_header Cache-Control "public, must-revalidate, proxy-revalidate";

try_files $uri $uri/ @fallback;

}

if ($host ~* www\.(.*)) {

set $host_without_www $1;

rewrite ^(.*)$ http://$host_without_www$1 permanent;#301 redirect

}

if (!-e $request_filename){

rewrite ^/(.+)$ /index.php?_route_=$1 last;

}

}

location @fallback {

error_log /dev/null crit;

access_log off ;

}

location /index.html {rewrite ^(.*)$ http://site.ru/ permanent;}

location /download { rewrite ^/download/(.*) /index.php?route=error/not_found last; }

location = /sitemap.xml { rewrite ^(.*)$ /index.php?route=feed/soforp_fast_sitemap last; }# тут с sitemap сами поиграйтесь

location /sitemap { rewrite ^/sitemap([^\.]+).xml$ /index.php?route=feed/soforp_fast_sitemap&path=$1 last; }# тут с sitemap сами поиграйтесь

location ~* (\.(tpl|ini))$ { deny all; }

location ~ (?i)((\.tpl|\.ini|\.log|(?

# Vqmod settings

# Add trailing slash to */vqmod/install requests.

rewrite /vqmod/install$ $scheme://$host$uri/ permanent;

# Run index.php on /vqmod/install calls

location /vqmod/install/ {

index index.php;

}

# Nginx configuration of vqmod htaccess

location /vqmod/ {

location ~ \.(xml|cache) {

deny all;

}

}

# End Vqmod settings

# Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!

location ~* \.(engine|inc|info|ini|install|log|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {

deny all;

}

# Do not log access to the favicon, to keep the logs cleaner

location = /favicon.ico {

log_not_found off;

access_log off;

}

# Make sure these get through

location = /robots.txt {

allow all;

log_not_found off;

access_log off;

}

# Fix for Firefox issue with cross site font icons

location ~* \.(eot|otf|ttf|woff)$ {

add_header Access-Control-Allow-Origin *;

}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).

# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)

location ~ /\. {

access_log off;

log_not_found off;

deny all;

}

location ~ ~$ {

access_log off;

log_not_found off;

deny all;

}

# Deny access to any files with a .php extension in these directories

# Works in sub-directory installs and also in multisite network

# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)

location ~* /(?:cache|logs|image|download)/.*\.php$ {

deny all;

}

location @php {

fastcgi_index index.php;

fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@prof-66.ru";

fastcgi_pass unix:/var/www/php-fpm/dimmam.sock;

fastcgi_split_path_info ^((?U).+\.ph(? :P\d*|tml))(/?.+)$;

try_files $uri =404;

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;

}

access_log off ;

gzip on;

gzip_comp_level 5;

gzip_disable "msie6";

gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

listen 62.109.3.234:80;

}

location проверьте в 52 строке у вас там есть незакрытый. и чутка повнимательнее.

Share this post


Link to post
Share on other sites

не могу понять куда ее тут вставить :( в 52ой

rewrite /vqmod/install$ $scheme://$host$uri/ permanent;

что тут надо изменить?

site.ru да, поправил

Share this post


Link to post
Share on other sites

location проверьте в 52 строке у вас там есть незакрытый. и чутка повнимательнее.

Взял ваш конфиг без модификаций, просто проверить, та же самая ошибка, на ту же строчку.. Помогите плиз.

Share this post


Link to post
Share on other sites

доберусь до компа, гляну

Share this post


Link to post
Share on other sites

Вот это, в мною предоставленном конфиге найдите
 
location ~ (?i)((\.tpl|\.ini|\.log|(?
 
и замените

location ~ (?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt)) { deny all; }

Случайно затер, скорее всего в этом и есть ошибка.

  • +1 1

Share this post


Link to post
Share on other sites

Ура! Свершилось чудо! Огромное человеческое спасибо Kindzaza !!!!! На всякий выкладываю его рабочий работающий конфиг, чтобы таким как я не приходилось долго искать :)

Думаю настраивать еще есть что по ускорению сайта, но начало есть, заработало! Спасибо всем кто пытался помочь :)

 

#user '******' virtual host 'site.ru' configuration file
server {
server_name site.ru www.site.ru;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.php index.html;
root $root_path;
set $root_path /var/www/******/data/www/site.ru;
error_log /var/www/httpd-logs/site.ru.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;

location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}

location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
expires 180d;
log_not_found off;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
try_files $uri $uri/ @fallback;
}

if ($host ~* www\.(.*)) {
set $host_without_www $1;
rewrite ^(.*)$ http://$host_without_www$1 permanent;#301 redirect
}

if (!-e $request_filename){
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
}
location @fallback {
error_log /dev/null crit;
access_log off ;
}

location /index.html {rewrite ^(.*)$ http://site.ru/ permanent;}
location /download { rewrite ^/download/(.*) /index.php?route=error/not_found last; }
location = /sitemap.xml { rewrite ^(.*)$ /index.php?route=feed/soforp_fast_sitemap last; }# тут с sitemap сами поиграйтесь
location /sitemap { rewrite ^/sitemap([^\.]+).xml$ /index.php?route=feed/soforp_fast_sitemap&path=$1 last; }# тут с sitemap сами поиграйтесь
location ~* (\.(tpl|ini))$ { deny all; }
location ~ (?i)((\.tpl|\.ini|\.log|(?
# Vqmod settings
# Add trailing slash to */vqmod/install requests.
rewrite /vqmod/install$ $scheme://$host$uri/ permanent;

# Run index.php on /vqmod/install calls
location /vqmod/install/ {
index index.php;
}

# Nginx configuration of vqmod htaccess
location /vqmod/ {
location ~ \.(xml|cache) {
deny all;
}
}
# End Vqmod settings

# Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
location ~* \.(engine|inc|info|ini|install|log|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
}

# Do not log access to the favicon, to keep the logs cleaner
location = /favicon.ico {
log_not_found off;
access_log off;
}

# Make sure these get through
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# Fix for Firefox issue with cross site font icons
location ~* \.(eot|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}

location ~ ~$ {
access_log off;
log_not_found off;
deny all;
}

# Deny access to any files with a .php extension in these directories
# Works in sub-directory installs and also in multisite network
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~* /(?:cache|logs|image|download)/.*\.php$ {
deny all;
}

location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@site.ru";
fastcgi_pass unix:/var/www/php-fpm/******.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:P\d*|tml))(/?.+)$;
try_files $uri =404;
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;
}
access_log off ;
gzip on;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
listen ВАШ IP:ПОРТ default_server;
}



Где site.ru - ваш домен, ********* - пользователь

  • +1 1

Share this post


Link to post
Share on other sites

ммда, я выложил, а строчку так и не поправил

#user '******' virtual host 'site.ru' configuration file
server {
server_name site.ru www.site.ru;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.php index.html;
root $root_path;
set $root_path /var/www/******/data/www/site.ru;
error_log /var/www/httpd-logs/site.ru.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;

location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}

location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
expires 180d;
log_not_found off;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
try_files $uri $uri/ @fallback;
}

if ($host ~* www\.(.*)) {
set $host_without_www $1;
rewrite ^(.*)$ http://$host_without_www$1 permanent;#301 redirect
}

if (!-e $request_filename){
rewrite ^/(.+)$ /index.php?_route_=$1 last;
}
}
location @fallback {
error_log /dev/null crit;
access_log off ;
}

location /index.html {rewrite ^(.*)$ http://site.ru/ permanent;}
location /download { rewrite ^/download/(.*) /index.php?route=error/not_found last; }
location = /sitemap.xml { rewrite ^(.*)$ /index.php?route=feed/soforp_fast_sitemap last; }# тут с sitemap сами поиграйтесь
location /sitemap { rewrite ^/sitemap([^\.]+).xml$ /index.php?route=feed/soforp_fast_sitemap&path=$1 last; }# тут с sitemap сами поиграйтесь
location ~* (\.(tpl|ini))$ { deny all; }
location ~ (?i)((\.tpl|\.ini|\.log|(?# Vqmod settings
# Add trailing slash to */vqmod/install requests.
rewrite /vqmod/install$ $scheme://$host$uri/ permanent;

# Run index.php on /vqmod/install calls
location /vqmod/install/ {
index index.php;
}

# Nginx configuration of vqmod htaccess
location /vqmod/ {
location ~ \.(xml|cache) {
deny all;
}
}
# End Vqmod settings

# Make sure files with the following extensions do not get loaded by nginx because nginx would display the source code, and these files can contain PASSWORDS!
location ~* \.(engine|inc|info|ini|install|log|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
deny all;
}

# Do not log access to the favicon, to keep the logs cleaner
location = /favicon.ico {
log_not_found off;
access_log off;
}

# Make sure these get through
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}

# Fix for Firefox issue with cross site font icons
location ~* \.(eot|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}

# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}

location ~ ~$ {
access_log off;
log_not_found off;
deny all;
}

# Deny access to any files with a .php extension in these directories
# Works in sub-directory installs and also in multisite network
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
location ~* /(?:cache|logs|image|download)/.*\.php$ {
deny all;
}

location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@site.ru";
fastcgi_pass unix:/var/www/php-fpm/******.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:P\d*|tml))(/?.+)$;
try_files $uri =404;
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;
}
access_log off ;
gzip on;
gzip_comp_level 5;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
listen ВАШ IP:ПОРТ default_server;
}



Где site.ru - ваш домен, ********* - пользователь

Share this post


Link to post
Share on other sites

ну и плюс, если у вас мультимагазин, то для каждого надо это прописывать, только root директорию менять на основной.

Все в этой связке заработало без доп настроек в 1,5 раза быстрее.

Edited by dimmam

Share this post


Link to post
Share on other sites

удалено

Edited by dimmam

Share this post


Link to post
Share on other sites
Posted (edited)
В 21.04.2016 в 21:11, dimmam сказал:

Ура! Свершилось чудо! Огромное человеческое спасибо Kindzaza !!!!! На всякий выкладываю его рабочий работающий конфиг, чтобы таким как я не приходилось долго искать :)

 

Привет.

По всей теме прошелся, но так и не понял в какой именно файл вы прописывали этот рабочий конфиг?
У меня сейчас именно та же ситуация.. 
Был платный хостинг где была связка Apache+Nginx версия php 5.6 ., сейчас поднял свой веб-сервер на Centos7 + VestaCP.  С связкой Nginx+Phpfpm версия php 7.3

И у меня тоже ошибка 404..

Edited by Focster2019

Share this post


Link to post
Share on other sites

Да собственно все это балавство было из за не настроенного сервера... Давно переехал на другой хостинг. Если у вас VDS какой нибудь, то смотрите логи ошибок сервера для начала, потом служб.. Ну и настраивайте пошагово.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

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.