Why do I get a requested URL not found error when I try to initiate the oauth dance with my Magento instance?

When I access http://hostname/magento/oauth/initiate from a browser, I get the following:

Not Found The requested URL /opt/bitnami/apps/magento/htdocs/index.php was not found on this server.

The error log shows this: [Thu Oct 04 23:49:52 2012] [error] [client 70.197.141.210] File does not exist: /opt/bitnami/apache2/htdocs/opt

I am using the bitnami AMI for EC2. I would appreciate any suggestions on how to debug this problem.

You have to enable OAuth before using it. Have you done it? You have a how to in the link bellow:

http://www.magentocommerce.com/api/rest/authentication/oauth_configuration.html

Thanks for the response, victor. I've performed the steps described in the link you posted. Unfortunately, I still get the "Not found" error. I was getting the same error page when I was trying to access the rest API as a guest (doesn't require oauth authentication). I was able to access the api after performing the steps in this user's post (update section): http://www.magentocommerce.com/boards/viewthread/279715/#t397859

I wonder if something like this needs to be done for oauth URLs...

Update: I was able to start getting oauth to work by removing all rewrite rules and simply accessing http://hostname/magento/index.php/oauth/initiate

Thanks for posting your solution. We added the oauth module in the PHP folder. Did you enabled it in the PHP configuration right? It is only necessary to edit the /opt/bitnami/php/etc/php.ini file and uncomment the ";extension=oauth.so" line. Then restart Apache server:

/opt/bitnami/ctlscript.sh restart apache

Regarding the Magento application itself not sure if it also require changes. Could you check that you have OAuth enabled?

Actually, that line is still commented out in my /opt/bitnami/php/etc/php.ini file. Strange.