• Почему JSON на сервере всегда 403?

    @shelomitsky2011 Автор вопроса
    dodo512, капец, такую простую вещь не понял. спасибо!
  • Почему JSON на сервере всегда 403?

    @shelomitsky2011 Автор вопроса
    ky0, А как это мне сделать?
    ЗЫ: Тут не запросы, просто файл отпускаться не хочет хоть и присутствует
  • Почему JSON на сервере всегда 403?

    @shelomitsky2011 Автор вопроса
    server {
    server_name xn--b1agjiih2ae7a5c.xn--90ais *.xn--b1agjiih2ae7a5c.xn--90ais www.xn--b1agjiih2ae7a5c.xn--90ais;
    charset off;
    index index.php index.html;
    disable_symlinks if_not_owner from=$root_path;
    include /etc/nginx/vhosts-includes/*.conf;
    include /etc/nginx/vhosts-resources/xn--b1agjiih2ae7a5c.xn--90ais/*.conf;
    set $root_path /var/www/www-root/data/www;
    set $subdomain xn--b1agjiih2ae7a5c.xn--90ais;
    if ($host ~* ^((.*).xn--b1agjiih2ae7a5c.xn--90ais)$) {
    set $subdomain $1;
    }
    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|woff|webp|json)$ {
    expires 365d;
    }
    location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
    expires 365d;
    }
    }
    return 301 https://$host:443$request_uri;
    error_log /var/www/httpd-logs/xn--b1agjiih2ae7a5c.xn--90ais.error.log notice;
    gzip on;
    gzip_comp_level 6;
    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;
    location @php {
    fastcgi_index index.php;
    fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@xn--b1agjiih2ae7a5c.xn--90ais";
    fastcgi_pass unix:/var/www/php-fpm/2.sock;
    fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
    try_files $uri =404;
    include fastcgi_params;
    }
    access_log off;
    root $root_path/$subdomain;
    listen 178.172.137.204:80;
    http2_push_preload on;
    }
    server {
    }
    location / {
    location ~ [^/]\.ph(p\d*|tml)$ {
    try_files /does_not_exists @php;
    }
    if (!-e $request_filename){
    rewrite ^/(.+)$ /index.php?_route_=$1 last;
    }
    location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|woff|webp|woff2)$ {
    expires 365d;
    }
    location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
    expires 365d;
    }
    }
    location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|woff2)$ {
    expires 180d;
    log_not_found off;
    add_header Pragma public;
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    try_files $uri $uri/ @fallback;
    }
    # Fix for Firefox issue with cross site font icons
    location ~* \.(eot|otf|ttf|woff)$ {
    add_header Access-Control-Allow-Origin *;
    }
    location ~* (\.(tpl|ini))$ { deny all; }
    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;
    }
    location ~ /\. {
    access_log off;
    log_not_found off;
    deny all;
    }
    location ~ ~$ {
    access_log off;
    log_not_found off;
    deny all;
    }
    location ~* /(?:cache|logs|image|download)/.*\.php$ {
    deny all;
    }
    error_log /var/www/httpd-logs/xn--b1agjiih2ae7a5c.xn--90ais.error.log notice;
    gzip on;
    gzip_comp_level 6;
    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;
    location @php {
    fastcgi_index index.php;
    fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@xn--b1agjiih2ae7a5c.xn--90ais";
    fastcgi_pass unix:/var/www/php-fpm/2.sock;
    fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
    try_files $uri =404;
    include fastcgi_params;
    }
    add_header Strict-Transport-Security "max-age=31536000;";
    access_log off;
    root $root_path/$subdomain;
    listen 178.172.137.204:443 ssl http2;
    http2_push_preload on;
    }