Jump to content

Unable to access rest api.


Recommended Posts

I transferred my site over to a new server. Centos 7 with nginx.

 https://gyazo.com/174973b095adcde2ecdc10c7728df816 I see this error when I go to the rest api section in the admin cp. Yes, I've updated the .htaccess multiple times.

This worked fine on my other server, and i scp'd everything over so I don't think much as changed other then apache to nginx.

Also the owner of the .htaccess is the same as the rest of the files. I must note, I also just updated to 4.3.2; 

Here is my nginx config.

server {
    listen 443;
    server_name ****** ********;

    ssl on;
    ssl_certificate /etc/ssl/cert_chain.crt;
    ssl_certificate_key /etc/ssl/privkey.key;

    root /usr/share/nginx/html;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ @ips;
    }
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

    location ~* ^.+\.(?:jpg|jpeg|gif|css|png|js|ico|xml|htm|swf|cur)$ {
        # If the static resource doesn't exist, pass off to IPS' 404 handler
        try_files   $uri @ips404;

        access_log  off;
        expires     2w;
    }
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location @ips {
        include             fastcgi_params;
        fastcgi_pass        unix:/var/run/php-fpm/php-fpm.sock;

        fastcgi_param       SCRIPT_FILENAME  $document_root/index.php;
        fastcgi_param       SCRIPT_NAME      /index.php;

    }
}

 

This is my nginx config. 

Link to comment
Share on other sites

  • 4 months later...
On 5/16/2018 at 10:35 PM, heydoon said:

I transferred my site over to a new server. Centos 7 with nginx.

 https://gyazo.com/174973b095adcde2ecdc10c7728df816 I see this error when I go to the rest api section in the admin cp. Yes, I've updated the .htaccess multiple times.

This worked fine on my other server, and i scp'd everything over so I don't think much as changed other then apache to nginx.

Also the owner of the .htaccess is the same as the rest of the files. I must note, I also just updated to 4.3.2; 

Here is my nginx config.


server {
    listen 443;
    server_name ****** ********;

    ssl on;
    ssl_certificate /etc/ssl/cert_chain.crt;
    ssl_certificate_key /etc/ssl/privkey.key;

    root /usr/share/nginx/html;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ @ips;
    }
    error_page 404 /404.html;
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
        root /usr/share/nginx/html;
    }

    location ~* ^.+\.(?:jpg|jpeg|gif|css|png|js|ico|xml|htm|swf|cur)$ {
        # If the static resource doesn't exist, pass off to IPS' 404 handler
        try_files   $uri @ips404;

        access_log  off;
        expires     2w;
    }
    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location @ips {
        include             fastcgi_params;
        fastcgi_pass        unix:/var/run/php-fpm/php-fpm.sock;

        fastcgi_param       SCRIPT_FILENAME  $document_root/index.php;
        fastcgi_param       SCRIPT_NAME      /index.php;

    }
}

 

This is my nginx config. 

have the problem too do you fixxed it?

Link to comment
Share on other sites

  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...