Skip to content
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

Presentation of PoC not working with Nginx #81

Open
Vidyut opened this issue Jun 8, 2018 · 4 comments
Open

Presentation of PoC not working with Nginx #81

Vidyut opened this issue Jun 8, 2018 · 4 comments

Comments

@Vidyut
Copy link

Vidyut commented Jun 8, 2018

My server shows a page not found for the url. For example https://aadhaar.fail/ldp#https://aadhaar.fail/api/ldp/v1/person/nandan-nilekani/ if you get the data using curl, you see that the json is indeed generated. It does not process the # followed by the PoC url. I was stumped till I checked the servers for balessan.me and www.virtual-assembly.org - both return Apache in their header. That gave me a starting point. Will share back any fixes I find.

@Vidyut
Copy link
Author

Vidyut commented Jun 8, 2018

The following code needs to be added to the server block for Nginx (wp-ldp/front should be replaced by whatever frontpage url is set in the code of the plugin.

location /wp-ldp/front { try_files $uri $uri/ /wp-content/plugins/wp-ldp/public/index.php?q=$uri&$args; }
However, the presentation continues to fail. Will investigate. At first look, it appears that the plugin isn't loading things right.

If I may ask, why not use the standard custom post type to publish the presentation and link to the json from the header?

@balessan
Copy link
Contributor

In the documentation I assumed (it's written as is) people were using Apache, as I have never used Nginx myself I did not want to lose time offering extensive documentation on this side.

Your issue could be a permalink issue. Have you tried go to the permalink settings and save it back ?

We implemented this plugin as a Proof on concept to answer to custom ontologies so we did not want to use default post types at first. Indeed I now think it was a complication for nothing.

I'd really like to use the default users and posts/pages objects and only exposing proper API. I also like the idea of choosing which post type you would like to associate with any "resources", as proposed in #80

@Vidyut
Copy link
Author

Vidyut commented Sep 18, 2018

I played with permalinks. Wasn't a permalinks issue. Then got busy with something else and haven't been able to go back and figure this out.

Using standard post types would be a good idea - even if we can move to them now. Many things will then work out of the box, compatibility with other plugins will also be predictable, etc.

@balessan
Copy link
Contributor

Yeah sure. I wasn't that expert of wordpress when I started this plugin project. Makes more sense now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants