New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET https://DNS.SERVER.NAME/wc-api/v3/products/categories 404 (Not Found) #9229

Closed
ganesansays opened this Issue Sep 26, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@ganesansays
Copy link

ganesansays commented Sep 26, 2015

Hi There,

I have trouble making wc-api/v3 working on my EC2. I have made it work in my mac locally.

The following is what I have done after installing woocommerce and enabling https with self-signed certificate.

  1. Enable Api (Default enabled)
  2. Change the permlinks option to "Post Name"
  3. Generated API key and secret

This is the same setting I did in my mac. There is a small difference due to the folder structure that I have in my mac.

.htaccess in my mac:

BEGIN WordPress

RewriteEngine On RewriteBase /wordpress/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wordpress/index.php [L] # END WordPress

.htaccess in my ec2 instance:

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress

CRUL:
curl -k https://FQDN.OF.MY.SERER/wc-api/v3/products/categories -u ck_abigkey:cs_abigsecret

Output:

<title>404 Not Found</title>

Not Found

The requested URL /wc-api/v3/products/categories was not found on this server.


Apache/2.2.31 (Amazon) Server at FQDN.OF.MY.SERVER Port 443

Versions in both MAC and EC2:
Wordpress Version: 4.3.1
Woocommerce plugin version: 2.4.7

@ganesansays

This comment has been minimized.

Copy link

ganesansays commented Sep 26, 2015

Using non-permlink url seems to be working:

curl -k "https://FQDN.OF.MY.SERVER/index.php?wc-api-version=v3&wc-api-route=/products/categories" -u ck_abigkey:cs_abigsecret

{"product_categories":[{"id":6,"name":"NewCat","slug":"newcat","parent":0,"description":"","display":"default","image":"","count":0}]}

Like to understand is there any issue with the url rewrite configured?

@ganesansays

This comment has been minimized.

Copy link

ganesansays commented Sep 26, 2015

:( Simple httpd config issue ...

@ganesansays

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment