Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Proceed to Extras → User API - you can manage your API routes from this section
  2. It is important to set URL rewrites for API to function, depending on your web-server software
    1. Apache users
      in /api folder rename file template.htaccess to .htaccess 
    2. Nginx (including HostBill enterprise) users .
      If you are using SEO URL rewrites described here, modify block "@seohburl" in /etc/nginx/locations/hostbill.conf to look like:

      Code Block
      location @seohburl {
          rewrite ^/api/(.+)$ /api/index.php?/$1 last;
          rewrite ^/(.+)$ /index.php?/$1 last;
        }



      If you are not using SEO urls, edit your location file (in server section, for HostBill enterprise it is /etc/nginx/locations/hostbill.conf, add 

      Code Block
      location @userapi {
            rewrite ^/api/(.+)$ /api/index.php?/$1 last;
        }

      Next, to main location add try files line:

      Code Block
      try_files $uri $uri/ index.php @userapi;



  3. Now, restart your webserver.

...