Proxy / Rewrite your API Endpoint into Domain Segment with Nginx

I wanted to make an API available on the same domain as a single page app built with Vue.js, which means that I had to rewrite a part of the domain to use another port on the same host, but you can also use an entirely different machine or have a load balancer in between.

This post is part of the Making Of: photographerexcuses.com series.

I picked nginx for a server for some PHP productions and this because it simply has the best configs and it tends to perform a bit better if you don’t have a lot of RAM to throw at your server.

Continue reading “Proxy / Rewrite your API Endpoint into Domain Segment with Nginx”