Nginx.conf for a calm api

I am currently developing a RESTful api as a bridge between my ios / web application and their common database and content.

I found a way to implement a RESTful api in PHP on this blog .

I started my development on my OVH Apache server. Unfortunately, they did not provide support from the web host, and there is no way to install it. OVH told me that for this I need a dedicated server or a VPS server.

Now I will work on dotCloud . This is a great alternative, I think, but their servers (apparently Amazon EC2) are nginx based. This was the first time I used the nginx server, and I need your help to "translate" this .htaccess into the nginx.conf file.

Before asking for help, I tried to find the nginx.conf file for this, but no one worked. When I pushed them into my dotcloud application, my application's http service crashed and dotcloud cli said:

14:55:44 [www.0] WARNING. The service starts at startup or listens on the wrong port. He could not reply to the http port (80) for 30 seconds. Check application logs.

Thanks for any help in advance :)

+7
source share
1 answer

Thanks to this htaccess for the nginx.conf converter, as well as some tricks and tests that I have done, here is the corresponding nginx.conf file.

Hope this helps people.;)

+6
source

All Articles