1 ответ

  • 1
    Михаил Ушенин Webasyst 30 октября 2018 09:20 # Решение

    Проверьте конфигурацию nginx на соответствие этому примеру.

    • +1
      Сергей Малышкин (SEO) Сергей Малышкин (SEO) 30 октября 2018 11:12 #

      Сайт сейчас работает с таким конфигом - добавлен location /, иначе он вообще не открывается.

      server {
      	server_name nizhnee.com;
      	charset off;
      	index index.html index.php;
      	disable_symlinks if_not_owner from=$root_path;
      	include /etc/nginx/vhosts-includes/*.conf;
      	include /etc/nginx/vhosts-resources/nizhnee.com/*.conf;
      	ssi on;
      	set $root_path /var/www/www-root/data/www/nizhnee.com;
      	root $root_path;
      	try_files $uri $uri/ /index.php?$query_string;
          location / {
      	try_files $uri $uri/ /index.php?$query_string;
      		location ~ [^/]\.ph(p\d*|tml)$ {
      			try_files /does_not_exists @php;
      		}
      	}
      	location @php {
      		fastcgi_index index.php;
      		fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@nizhnee.com";
      		fastcgi_pass unix:/var/www/php-fpm/www-root.sock;
      		fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
      		try_files $uri =404;
      		include fastcgi_params;
      	}
      	location /oauth.php {
              fastcgi_split_path_info  ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
              include fastcgi_params;
              fastcgi_pass  unix:/var/www/php-fpm/www-root.sock;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              fastcgi_param PATH_INFO $fastcgi_path_info;
      	}
      	location ~ /wa-content {
              allow all;
          }
          location ~ /(lib/|locale|templates) {
              deny all;
          }
          location ~* ^/wa-(log|config|cache|system)/ {
              return 403;
          }
          location ~* ^/wa-data/public/contacts/photos/[0-9]+/ {
               root /var/www/www-root/data/www/nizhnee.com;
               access_log off;
               expires  30d;
               error_page   404  =  @contacts_thumb;
          }
          location @contacts_thumb {
              include /etc/nginx/fastcgi_params;
              fastcgi_pass  unix:/var/www/php-fpm/www-root.sock;
              fastcgi_param  SCRIPT_NAME  /wa-data/public/contacts/photos/thumb.php;
              fastcgi_param  SCRIPT_FILENAME  $document_root/wa-data/public/contacts/photos/thumb.php;
          }
          location ~* ^/wa-data/public/photos/[0-9]+/ {
              access_log   off;
              expires      30d;
              error_page   404  =  @photos_thumb;
          }
          location @photos_thumb {
              include /etc/nginx/fastcgi_params;
              fastcgi_pass  unix:/var/www/php-fpm/www-root.sock;
              fastcgi_param  SCRIPT_NAME  /wa-data/public/photos/thumb.php;
              fastcgi_param  SCRIPT_FILENAME  $document_root/wa-data/public/photos/thumb.php;
          }
          location ~* ^/wa-data/public/shop/products/[0-9]+/ {
              access_log   off;
              expires      30d;
              error_page   404  =  @shop_thumb;
          }
          location @shop_thumb {
              include /etc/nginx/fastcgi_params;
              fastcgi_pass  unix:/var/www/php-fpm/www-root.sock;
              fastcgi_param  SCRIPT_NAME  /wa-data/public/shop/products/thumb.php;
              fastcgi_param  SCRIPT_FILENAME  $document_root/wa-data/public/shop/products/thumb.php;
          }
          location ~* ^/wa-data/public/shop/promos/[0-9]+ {
              access_log   off;
              expires      30d;
              error_page   404  =  @shop_promo;
          }
          location @shop_promo {
              include /etc/nginx/fastcgi_params;
              fastcgi_pass  unix:/var/www/php-fpm/www-root.sock;
              fastcgi_param  SCRIPT_NAME  /wa-data/public/shop/promos/thumb.php;
              fastcgi_param  SCRIPT_FILENAME  $document_root/wa-data/public/shop/promos/thumb.php;
          }
          location ~* ^/wa-data/public/mailer/files/[0-9]+/ {
              access_log   off;
              error_page   404  =  @mailer_file;
          }
          location @mailer_file {
              include /etc/nginx/fastcgi_params;
              fastcgi_pass  unix:/var/www/php-fpm/www-root.sock;
              fastcgi_param  SCRIPT_NAME  /wa-data/public/mailer/files/file.php;
              fastcgi_param  SCRIPT_FILENAME $document_root/wa-data/public/mailer/files/file.php;
          }
          # end mailer app
      
          location ~* ^.+\.(jpg|jpeg|gif|png|js|css)$ {
              access_log   off;
              expires      30d;
          }
      	include /etc/nginx/vhosts-resources/nizhnee.com/*.conf;
      	listen 62.109.15.40:443 ssl http2;
      }
      

      Где ошибка не понятно

Добавить ответ

Чтобы добавить комментарий, зарегистрируйтесь или войдите