Nginx in front of Musicbrainz


I want to run musicbrainz on was ec2 with nginx as a reverse proxy web server. As far as I can tell with the default setup as outlined here you end up with musicbrainz running on plackup which is only meant to be used in a dev environment.

I don’t have much experience with nginx or musicbrainz but as far as I can gather I need to use fastcgi in order to get requests proxying through nginx to the musicbrainz server. Is this correct? If so can is there some way I can use the nginx stuff here:


I use Apache acting as a reverse proxy so requests get forwarded to port 5000.
You need to make sure the following variable is set before the musicbrainz server is started.
I start the musicbrainz server from systemd and have a line to set this environment variable.

There is a proper way of running this with fastcgi but I could not get this working on my server.
A reverse proxy was easier for me to configure so I use that.