Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Recommended Posts

вот же всё работает
http://prof-66.ru/futbolka-putin-16
http://prof-66.ru/about_us

 

Змінено користувачем AWARO
Надіслати
Поділитися на інших сайтах


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

Надіслати
Поділитися на інших сайтах


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

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

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

Надіслати
Поділитися на інших сайтах


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

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

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

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

Надіслати
Поділитися на інших сайтах


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

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


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

#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 [email protected]";
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
Надіслати
Поділитися на інших сайтах


Нет, он выложил корневой конфиг (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 и т.д.

Надіслати
Поділитися на інших сайтах


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 [email protected]";

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;

Надіслати
Поділитися на інших сайтах


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

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

Синтаксическая ошибка: '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 [email protected]";

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;

}

Надіслати
Поділитися на інших сайтах


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

Синтаксическая ошибка: '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 [email protected]";

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 строке у вас там есть незакрытый. и чутка повнимательнее.

Надіслати
Поділитися на інших сайтах


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

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

Надіслати
Поділитися на інших сайтах


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

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

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

  • +1 1
Надіслати
Поділитися на інших сайтах


Ура! Свершилось чудо! Огромное человеческое спасибо 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 [email protected]";
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
Надіслати
Поділитися на інших сайтах


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

#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 [email protected]";
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 - ваш домен, ********* - пользователь

Надіслати
Поділитися на інших сайтах


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

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

Змінено користувачем dimmam
Надіслати
Поділитися на інших сайтах


  • 1 year later...
  • 1 year later...
В 21.04.2016 в 21:11, dimmam сказал:

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

 

Привет.

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

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

Змінено користувачем Focster2019
Надіслати
Поділитися на інших сайтах


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

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.