16

I am using magento community edition 1.9.0.1. I try the REST Client Example explained here: http://www.magentocommerce.com/api/rest/testing_rest_resources.html

But every time I send a request I got a 404

My server runs on localhost under the url : http://localhost/magento/

The rest api url I try is: http://localhost/magento/api/rest/products

For testing I am using the Firefox RESTClient Plugin.

What could be the reason for the error code 404?

Solution:

The reason for the 404 error message was a missing configuration in the apache2.con File (/etc/apache2/apache2.conf).

To enable rewrites it is necessary to add the option 'AllowOverride All'

<Directory /var/www/html/magento/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Be careful with the directory path in the Tag 'Directory'. The path must match the location of your Magento installation on the file system. After changing the configuration restart the apache server.

closed as too broad by Fabian Blechschmidt, Keyul Shah, Marius, Mufaddal, David Manners Jul 24 '14 at 6:56

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Welcome to Magento! Please check this great debugging tutorial and report back. – Fabian Blechschmidt Jul 23 '14 at 21:46
  • 2
    I tried this debugging options. But I still got 404. Do you think that the URL pattern I am using is correct ? I have seen other patterns like this one: '/api.php?type=rest/products'. ? – Ralph Jul 24 '14 at 13:43
  • 2
    the reason was that my apache server was not configured correctly. I think there was a missing rewriting configuration. Now it seems to work. But I can't explain what exactly I have done. I try to figure it out.... – Ralph Jul 25 '14 at 21:54
  • 2
    I found the solution and added it into the question. – Ralph Jul 26 '14 at 10:26
  • 2
    yes I would do so if the question will be reopened. – Ralph Jul 27 '14 at 20:10

Browse other questions tagged or ask your own question.